OpenJDK / amber / amber
changeset 28977:d7609b65606b
Merge
author | prr |
---|---|
date | Mon, 12 Jan 2015 12:52:39 -0800 |
parents | 8c912c147654 722378bc599e |
children | 8431abc709c0 |
files | corba/src/java.corba/share/classes/javax/transaction/InvalidTransactionException.java corba/src/java.corba/share/classes/javax/transaction/TransactionRequiredException.java corba/src/java.corba/share/classes/javax/transaction/TransactionRolledbackException.java corba/src/java.corba/share/classes/javax/transaction/package.html corba/src/java.sql/share/classes/javax/transaction/xa/XAException.java corba/src/java.sql/share/classes/javax/transaction/xa/XAResource.java corba/src/java.sql/share/classes/javax/transaction/xa/Xid.java corba/src/java.sql/share/classes/javax/transaction/xa/package.html jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/LazyEnvelopeStaxReader.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxReaderEx.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriter.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/stax/SaajStaxWriterEx.java jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/AttachmentPart.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Detail.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/DetailEntry.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/FactoryFinder.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MessageFactory.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeader.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeaders.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Name.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Node.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJMetaFactory.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJResult.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBody.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBodyElement.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnection.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnectionFactory.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConstants.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElement.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElementFactory.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPEnvelope.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPException.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFactory.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFault.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFaultElement.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeader.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeaderElement.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPMessage.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPPart.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Text.java jaxws/src/java.xml.soap/share/classes/javax/xml/soap/package.html jdk/test/java/rmi/server/RemoteServer/setLogPermission/java.policy langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/LVTRanges.java |
diffstat | 640 files changed, 47168 insertions(+), 39272 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Mon Jan 12 11:46:43 2015 -0800 +++ b/.hgtags Mon Jan 12 12:52:39 2015 -0800 @@ -287,3 +287,4 @@ 3107be2ba9c6e208a0b86bc7100a141abbc5b5fb jdk9-b42 6494b13f88a867026ee316b444d9a4fa589dd6bd jdk9-b43 abbfccd659b91a7bb815d5e36fed635dcdd40f31 jdk9-b44 +bfc24ae2b900187585079bb11e66e459d1e525fe jdk9-b45
--- a/.hgtags-top-repo Mon Jan 12 11:46:43 2015 -0800 +++ b/.hgtags-top-repo Mon Jan 12 12:52:39 2015 -0800 @@ -287,3 +287,4 @@ f7c11da0b0481d49cc7a65a453336c108191e821 jdk9-b42 02ee8c65622e8bd97496d584e22fc7dcf0edc4ae jdk9-b43 8994f5d87b3bb5e8d317d4e8ccb326da1a73684a jdk9-b44 +3dd628fde2086218d548841022ee8436b6b88185 jdk9-b45
--- a/Makefile Mon Jan 12 11:46:43 2015 -0800 +++ b/Makefile Mon Jan 12 12:52:39 2015 -0800 @@ -54,8 +54,11 @@ # Duplication of global targets, needed before ParseConfAndSpec in case we have # no configurations. help: - # If CONF is not set, look for all available configurations - CONF?= + # If both CONF and SPEC are unset, look for all available configurations by + # setting CONF to the empty string. + ifeq ($(SPEC), ) + CONF?= + endif endif # ... and then we can include our helper functions
--- a/common/autoconf/generated-configure.sh Mon Jan 12 11:46:43 2015 -0800 +++ b/common/autoconf/generated-configure.sh Mon Jan 12 12:52:39 2015 -0800 @@ -4329,7 +4329,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1418395009 +DATE_WHEN_GENERATED=1420811523 ############################################################################### # @@ -27408,8 +27408,8 @@ # The trailing space for everyone except PATH is no typo, but is needed due # to trailing \ in the Windows paths. These will be stripped later. $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
--- a/common/autoconf/spec.gmk.in Mon Jan 12 11:46:43 2015 -0800 +++ b/common/autoconf/spec.gmk.in Mon Jan 12 12:52:39 2015 -0800 @@ -690,10 +690,15 @@ # Images directory definitions JDK_IMAGE_SUBDIR:=jdk JRE_IMAGE_SUBDIR:=jre + # Colon left out to be able to override output dir for bootcycle-images JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR) +# Test image, as above +TEST_IMAGE_SUBDIR:=test +TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR) + # Macosx bundles directory definitions JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
--- a/common/autoconf/toolchain_windows.m4 Mon Jan 12 11:46:43 2015 -0800 +++ b/common/autoconf/toolchain_windows.m4 Mon Jan 12 12:52:39 2015 -0800 @@ -173,8 +173,8 @@ # The trailing space for everyone except PATH is no typo, but is needed due # to trailing \ in the Windows paths. These will be stripped later. $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
--- a/common/bin/unshuffle_list.txt Mon Jan 12 11:46:43 2015 -0800 +++ b/common/bin/unshuffle_list.txt Mon Jan 12 12:52:39 2015 -0800 @@ -26,10 +26,8 @@ corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl : corba/src/share/classes/com/sun/tools/corba/se/idl corba/src/java.corba/share/classes/javax/activity : corba/src/share/classes/javax/activity corba/src/java.corba/share/classes/javax/rmi : corba/src/share/classes/javax/rmi -corba/src/java.corba/share/classes/javax/transaction : corba/src/share/classes/javax/transaction corba/src/java.corba/share/classes/org/omg : corba/src/share/classes/org/omg corba/src/java.corba/share/classes/sun/corba : corba/src/share/classes/sun/corba -corba/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa corba/src/jdk.rmic/share/classes/sun/rmi/rmic/iiop : corba/src/share/classes/sun/rmi/rmic/iiop jaxp/src/java.xml/share/classes/com/sun/java_cup/internal/runtime : jaxp/src/com/sun/java_cup/internal/runtime jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal : jaxp/src/com/sun/org/apache/bcel/internal @@ -66,8 +64,8 @@ jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/org : jaxws/src/share/jaxws_classes/com/sun/xml/internal/org jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2 : jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2 jaxws/src/java.xml.bind/share/classes/javax/xml/bind : jaxws/src/share/jaxws_classes/javax/xml/bind -jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging -jaxws/src/java.xml.soap/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap +jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging +jaxws/src/java.xml.ws/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap jaxws/src/java.xml.ws/share/classes/com/oracle/webservices/internal : jaxws/src/share/jaxws_classes/com/oracle/webservices/internal jaxws/src/java.xml.ws/share/classes/com/oracle/xmlns/internal : jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal jaxws/src/java.xml.ws/share/classes/com/sun/org/glassfish : jaxws/src/share/jaxws_classes/com/sun/org/glassfish @@ -1245,6 +1243,8 @@ jdk/src/java.sql.rowset/share/classes/javax/sql/rowset : jdk/src/share/classes/javax/sql/rowset jdk/src/java.sql/share/classes/java/sql : jdk/src/share/classes/java/sql jdk/src/java.sql/share/classes/javax/sql : jdk/src/share/classes/javax/sql +jdk/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa +jdk/src/java.transaction/share/classes/javax/transaction : corba/src/share/classes/javax/transaction jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security : jdk/src/share/classes/com/sun/org/apache/xml/internal/security jdk/src/java.xml.crypto/share/classes/javax/xml/crypto : jdk/src/share/classes/javax/xml/crypto jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal : jdk/src/share/classes/org/jcp/xml/dsig/internal
--- a/corba/.hgtags Mon Jan 12 11:46:43 2015 -0800 +++ b/corba/.hgtags Mon Jan 12 12:52:39 2015 -0800 @@ -287,3 +287,4 @@ 078bb11af876fe528d4b516f33ad4dd9bb60549e jdk9-b42 9645e35616b60c5c07b4fdf11a132afc8081dfa8 jdk9-b43 1f57bd728c9e6865ccb9d43ccd80a1c11230a32f jdk9-b44 +9e3f2bed80c0e5a84a256ce41f1d10c5ade48466 jdk9-b45
--- a/corba/src/java.corba/share/classes/javax/transaction/InvalidTransactionException.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * Licensed Materials - Property of IBM - * RMI-IIOP v1.0 - * Copyright IBM Corp. 1998 1999 All Rights Reserved - * - */ - -package javax.transaction; - -/** - * This exception indicates that the request carried an invalid transaction - * context. For example, this exception could be raised if an error - * occured when trying to register a resource. - */ -public class InvalidTransactionException extends java.rmi.RemoteException -{ - public InvalidTransactionException() - { - super(); - } - - public InvalidTransactionException(String msg) - { - super(msg); - } -}
--- a/corba/src/java.corba/share/classes/javax/transaction/TransactionRequiredException.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * Licensed Materials - Property of IBM - * RMI-IIOP v1.0 - * Copyright IBM Corp. 1998 1999 All Rights Reserved - * - */ - -package javax.transaction; - -/** - * This exception indicates that a request carried a null transaction context, - * but the target object requires an activate transaction. - */ -public class TransactionRequiredException extends java.rmi.RemoteException -{ - public TransactionRequiredException() - { - super(); - } - - public TransactionRequiredException(String msg) - { - super(msg); - } -}
--- a/corba/src/java.corba/share/classes/javax/transaction/TransactionRolledbackException.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * Licensed Materials - Property of IBM - * RMI-IIOP v1.0 - * Copyright IBM Corp. 1998 1999 All Rights Reserved - * - */ - -package javax.transaction; - -/** - * This exception indicates that the transaction associated with processing - * of the request has been rolled back, or marked to roll back. Thus the - * requested operation either could not be performed or was not performed - * because further computation on behalf of the transaction would be - * fruitless - */ -public class TransactionRolledbackException extends java.rmi.RemoteException -{ - public TransactionRolledbackException() - { - super(); - } - - public TransactionRolledbackException(String msg) - { - super(msg); - } -}
--- a/corba/src/java.corba/share/classes/javax/transaction/package.html Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- -Copyright (c) 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. ---> - -</head> -<body bgcolor="white"> - -Contains three exceptions thrown by the ORB machinery during unmarshalling. -<p> -@since 1.3 -</body> -</html>
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/XAException.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package javax.transaction.xa; - -/** - * The XAException is thrown by the Resource Manager (RM) to inform the - * Transaction Manager of an error encountered by the involved transaction. - * - */ -public class XAException extends java.lang.Exception { - - /** - * The error code with which to create the SystemException. - * - * @serial The error code for the exception - */ - - public int errorCode; - - /** - * Create an XAException. - */ - public XAException() - { - super(); - } - - /** - * Create an XAException with a given string. - * - * @param s The <code>String</code> object containing the exception - * message. - */ - public XAException(String s) - { - super(s); - } - - /** - * Create an XAException with a given error code. - * - * @param errcode The error code identifying the exception. - */ - public XAException(int errcode) - { - super(); - errorCode = errcode; - } - - /** - * The inclusive lower bound of the rollback codes. - */ - public final static int XA_RBBASE = 100; - - /** - * Indicates that the rollback was caused by an unspecified reason. - */ - public final static int XA_RBROLLBACK = XA_RBBASE; - - /** - * Indicates that the rollback was caused by a communication failure. - */ - public final static int XA_RBCOMMFAIL = XA_RBBASE + 1; - - /** - * A deadlock was detected. - */ - public final static int XA_RBDEADLOCK = XA_RBBASE + 2; - - /** - * A condition that violates the integrity of the resource was detected. - */ - public final static int XA_RBINTEGRITY = XA_RBBASE + 3; - - /** - * The resource manager rolled back the transaction branch for a reason - * not on this list. - */ - public final static int XA_RBOTHER = XA_RBBASE + 4; - - /** - * A protocol error occurred in the resource manager. - */ - public final static int XA_RBPROTO = XA_RBBASE + 5; - - /** - * A transaction branch took too long. - */ - public final static int XA_RBTIMEOUT = XA_RBBASE + 6; - - /** - * May retry the transaction branch. - */ - public final static int XA_RBTRANSIENT = XA_RBBASE + 7; - - /** - * The inclusive upper bound of the rollback error code. - */ - public final static int XA_RBEND = XA_RBTRANSIENT; - - /** - * Resumption must occur where the suspension occurred. - */ - public final static int XA_NOMIGRATE = 9; - - /** - * The transaction branch may have been heuristically completed. - */ - public final static int XA_HEURHAZ = 8; - - /** - * The transaction branch has been heuristically committed. - */ - public final static int XA_HEURCOM = 7; - - /** - * The transaction branch has been heuristically rolled back. - */ - public final static int XA_HEURRB = 6; - - /** - * The transaction branch has been heuristically committed and - * rolled back. - */ - public final static int XA_HEURMIX = 5; - - /** - * Routine returned with no effect and may be reissued. - */ - public final static int XA_RETRY = 4; - - /** - * The transaction branch was read-only and has been committed. - */ - public final static int XA_RDONLY = 3; - - /** - * There is an asynchronous operation already outstanding. - */ - public final static int XAER_ASYNC = -2; - - /** - * A resource manager error has occurred in the transaction branch. - */ - public final static int XAER_RMERR = -3; - - /** - * The XID is not valid. - */ - public final static int XAER_NOTA = -4; - - /** - * Invalid arguments were given. - */ - public final static int XAER_INVAL = -5; - - /** - * Routine was invoked in an inproper context. - */ - public final static int XAER_PROTO = -6; - - /** - * Resource manager is unavailable. - */ - public final static int XAER_RMFAIL = -7; - - /** - * The XID already exists. - */ - public final static int XAER_DUPID = -8; - - /** - * The resource manager is doing work outside a global transaction. - */ - public final static int XAER_OUTSIDE = -9; - - -}
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/XAResource.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,314 +0,0 @@ -/* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package javax.transaction.xa; - -/** <p>The XAResource interface is a Java mapping of the industry standard - * XA interface based on the X/Open CAE Specification (Distributed - * Transaction Processing: The XA Specification). - * - * <p>The XA interface defines the contract between a Resource Manager - * and a Transaction Manager in a distributed transaction processing - * (DTP) environment. A JDBC driver or a JMS provider implements - * this interface to support the association between a global transaction - * and a database or message service connection. - * - * <p>The XAResource interface can be supported by any transactional - * resource that is intended to be used by application programs in an - * environment where transactions are controlled by an external - * transaction manager. An example of such a resource is a database - * management system. An application may access data through multiple - * database connections. Each database connection is enlisted with - * the transaction manager as a transactional resource. The transaction - * manager obtains an XAResource for each connection participating - * in a global transaction. The transaction manager uses the - * <code>start</code> method - * to associate the global transaction with the resource, and it uses the - * <code>end</code> method to disassociate the transaction from - * the resource. The resource - * manager is responsible for associating the global transaction to all - * work performed on its data between the start and end method invocations. - * - * <p>At transaction commit time, the resource managers are informed by - * the transaction manager to prepare, commit, or rollback a transaction - * according to the two-phase commit protocol.</p> - * - */ - -public interface XAResource -{ - /** Commits the global transaction specified by xid. - * - * @param xid A global transaction identifier - * - * @param onePhase If true, the resource manager should use a one-phase - * commit protocol to commit the work done on behalf of xid. - * - * @exception XAException An error has occurred. Possible XAExceptions - * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR, - * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO. - * - * <P>If the resource manager did not commit the transaction and the - * paramether onePhase is set to true, the resource manager may throw - * one of the XA_RB* exceptions. Upon return, the resource manager has - * rolled back the branch's work and has released all held resources. - */ - - void commit(Xid xid, boolean onePhase) throws XAException; - - - /** Ends the work performed on behalf of a transaction branch. - * The resource manager disassociates the XA resource from the - * transaction branch specified and lets the transaction - * complete. - * - * <p>If TMSUSPEND is specified in the flags, the transaction branch - * is temporarily suspended in an incomplete state. The transaction - * context is in a suspended state and must be resumed via the - * <code>start</code> method with TMRESUME specified.</p> - * - * <p>If TMFAIL is specified, the portion of work has failed. - * The resource manager may mark the transaction as rollback-only</p> - * - * <p>If TMSUCCESS is specified, the portion of work has completed - * successfully.</p> - * - * @param xid A global transaction identifier that is the same as - * the identifier used previously in the <code>start</code> method. - * - * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND. - * - * @exception XAException An error has occurred. Possible XAException - * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL, - * XAER_PROTO, or XA_RB*. - */ - - void end(Xid xid, int flags) throws XAException; - - - /** Tells the resource manager to forget about a heuristically - * completed transaction branch. - * - * @param xid A global transaction identifier. - * - * @exception XAException An error has occurred. Possible exception - * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or - * XAER_PROTO. - */ - - void forget(Xid xid) throws XAException; - - /** Obtains the current transaction timeout value set for this - * XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE> - * was not used prior to invoking this method, the return value - * is the default timeout set for the resource manager; otherwise, - * the value used in the previous <CODE>setTransactionTimeout</CODE> - * call is returned. - * - * @return the transaction timeout value in seconds. - * - * @exception XAException An error has occurred. Possible exception - * values are XAER_RMERR and XAER_RMFAIL. - */ - int getTransactionTimeout() throws XAException; - - /** This method is called to determine if the resource manager - * instance represented by the target object is the same as the - * resouce manager instance represented by the parameter <i>xares</i>. - * - * @param xares An XAResource object whose resource manager instance - * is to be compared with the resource manager instance of the - * target object. - * - * @return <i>true</i> if it's the same RM instance; otherwise - * <i>false</i>. - * - * @exception XAException An error has occurred. Possible exception - * values are XAER_RMERR and XAER_RMFAIL. - * - */ - boolean isSameRM(XAResource xares) throws XAException; - - /** Ask the resource manager to prepare for a transaction commit - * of the transaction specified in xid. - * - * @param xid A global transaction identifier. - * - * @exception XAException An error has occurred. Possible exception - * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, - * or XAER_PROTO. - * - * @return A value indicating the resource manager's vote on the - * outcome of the transaction. The possible values are: XA_RDONLY - * or XA_OK. If the resource manager wants to roll back the - * transaction, it should do so by raising an appropriate XAException - * in the prepare method. - */ - - int prepare(Xid xid) throws XAException; - - - /** Obtains a list of prepared transaction branches from a resource - * manager. The transaction manager calls this method during recovery - * to obtain the list of transaction branches that are currently in - * prepared or heuristically completed states. - * - * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS - * must be used when no other flags are set in the parameter. - * - * @exception XAException An error has occurred. Possible values are - * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO. - * - * @return The resource manager returns zero or more XIDs of the - * transaction branches that are currently in a prepared or - * heuristically completed state. If an error occurs during the - * operation, the resource manager should throw the appropriate - * XAException. - * - */ - - Xid[] recover(int flag) throws XAException; - - - /** Informs the resource manager to roll back work done on behalf - * of a transaction branch. - * - * @param xid A global transaction identifier. - * - * @exception XAException An error has occurred. - */ - - void rollback(Xid xid) throws XAException; - - - /** <P>Sets the current transaction timeout value for this <CODE>XAResource</CODE> - * instance. Once set, this timeout value is effective until - * <code>setTransactionTimeout</code> is invoked again with a different - * value. To reset the timeout value to the default value used by the resource - * manager, set the value to zero. - * - * If the timeout operation is performed successfully, the method returns - * <i>true</i>; otherwise <i>false</i>. If a resource manager does not - * support explicitly setting the transaction timeout value, this method - * returns <i>false</i>. - * - * @param seconds The transaction timeout value in seconds. - * - * @return <i>true</i> if the transaction timeout value is set successfully; - * otherwise <i>false</i>. - * - * @exception XAException An error has occurred. Possible exception values - * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL. - */ - boolean setTransactionTimeout(int seconds) throws XAException; - - - /** Starts work on behalf of a transaction branch specified in - * <code>xid</code>. - * - * If TMJOIN is specified, the start applies to joining a transaction - * previously seen by the resource manager. If TMRESUME is specified, - * the start applies to resuming a suspended transaction specified in the - * parameter <code>xid</code>. - * - * If neither TMJOIN nor TMRESUME is specified and the transaction - * specified by <code>xid</code> has previously been seen by the resource - * manager, the resource manager throws the XAException exception with - * XAER_DUPID error code. - * - * @param xid A global transaction identifier to be associated - * with the resource. - * - * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME. - * - * @exception XAException An error has occurred. Possible exceptions - * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE, - * XAER_NOTA, XAER_INVAL, or XAER_PROTO. - * - */ - void start(Xid xid, int flags) throws XAException; - - - /** - * Ends a recovery scan. - */ - public final static int TMENDRSCAN = 0x00800000; - - /** - * Disassociates the caller and marks the transaction branch - * rollback-only. - */ - public final static int TMFAIL = 0x20000000; - - /** - * Caller is joining existing transaction branch. - */ - public final static int TMJOIN = 0x00200000; - - /** - * Use TMNOFLAGS to indicate no flags value is selected. - */ - public final static int TMNOFLAGS = 0x00000000; - - /** - * Caller is using one-phase optimization. - */ - public final static int TMONEPHASE = 0x40000000; - - /** - * Caller is resuming association with a suspended - * transaction branch. - */ - public final static int TMRESUME = 0x08000000; - - /** - * Starts a recovery scan. - */ - public final static int TMSTARTRSCAN = 0x01000000; - - - /** - * Disassociates caller from a transaction branch. - */ - public final static int TMSUCCESS = 0x04000000; - - - /** - * Caller is suspending (not ending) its association with - * a transaction branch. - */ - public final static int TMSUSPEND = 0x02000000; - - /** - * The transaction branch has been read-only and has been committed. - */ - public final static int XA_RDONLY = 0x00000003; - - /** - * The transaction work has been prepared normally. - */ - public final static int XA_OK = 0; - -}
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/Xid.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package javax.transaction.xa; - -/** - * The Xid interface is a Java mapping of the X/Open transaction identifier - * XID structure. This interface specifies three accessor methods to - * retrieve a global transaction format ID, global transaction ID, - * and branch qualifier. The Xid interface is used by the transaction - * manager and the resource managers. This interface is not visible to - * the application programs. - */ -public interface Xid { - - /** - * Maximum number of bytes returned by getGtrid. - */ - final static int MAXGTRIDSIZE = 64; - - /** - * Maximum number of bytes returned by getBqual. - */ - final static int MAXBQUALSIZE = 64; - - /** - * Obtain the format identifier part of the XID. - * - * @return Format identifier. O means the OSI CCR format. - */ - int getFormatId(); - - /** - * Obtain the global transaction identifier part of XID as an array - * of bytes. - * - * @return Global transaction identifier. - */ - byte[] getGlobalTransactionId(); - - /** - * Obtain the transaction branch identifier part of XID as an array - * of bytes. - * - * @return Global transaction identifier. - */ - byte[] getBranchQualifier(); -}
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/package.html Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- -Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> - -</head> -<body bgcolor="white"> - -Provides the API that defines the contract between the transaction -manager and the resource manager, which allows the transaction -manager to enlist and delist resource objects (supplied by the -resource manager driver) in JTA transactions. The driver vendor -for a specific resource manager provides the implementation of -this API. -<p> -@since 1.4 -</body> -</html>
--- a/hotspot/.hgtags Mon Jan 12 11:46:43 2015 -0800 +++ b/hotspot/.hgtags Mon Jan 12 12:52:39 2015 -0800 @@ -447,3 +447,4 @@ 38cb4fbd47e3472bd1b5ebac83bda96fe4869c4f jdk9-b42 65a9747147b8090037541040ba67156ec914db6a jdk9-b43 43a44b56dca61a4d766a20f0528fdd8b5ceff873 jdk9-b44 +5dc8184af1e2bb30b0103113d1f1a58a21a80c37 jdk9-b45
--- a/jaxp/.hgtags Mon Jan 12 11:46:43 2015 -0800 +++ b/jaxp/.hgtags Mon Jan 12 12:52:39 2015 -0800 @@ -287,3 +287,4 @@ 47b0d3fa4118b9d56870cf4004987438c501f5c0 jdk9-b42 40b242363040229a05224fbc5dc203a3f46a8f8f jdk9-b43 0cb0844b58924d6086d2850c22087d06679d5eef jdk9-b44 +0dab3e848229127c7aca4c58b98e2d90ba70372f jdk9-b45
--- a/jaxws/.hgtags Mon Jan 12 11:46:43 2015 -0800 +++ b/jaxws/.hgtags Mon Jan 12 12:52:39 2015 -0800 @@ -290,3 +290,4 @@ 301ddb4478fb36d1f025d14e7e48c2a434e9e6ff jdk9-b42 edc13d27dc871be57d7ca77eef77e6d04972fee2 jdk9-b43 2a03baa4d849818ff6d635f110c2813b12fc2326 jdk9-b44 +e529374fbe526dbd668e5e98fc047b42b3bc6d33 jdk9-b45
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.messaging.saaj; - -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -/** - * LazyEnvelopeSource provides the source to create lazy Envelope - * - * @author shih-chang.chen@oracle.com - */ -public interface LazyEnvelopeSource extends javax.xml.transform.Source { - /** - * Retrieve payload qname without materializing its contents - * @return - * @throws SOAPException - */ - public QName getPayloadQName(); - public XMLStreamReader readToBodyStarTag() throws XMLStreamException; - public XMLStreamReader readPayload(); - public void writePayloadTo(XMLStreamWriter writer)throws XMLStreamException; - public boolean isPayloadStreamReader(); -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.messaging.saaj; - -import java.io.PrintStream; -import java.io.PrintWriter; - -import javax.xml.soap.SOAPException; - -/** - * An exception that signals that a SOAP exception has occurred. A - * <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); - } - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,657 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.messaging.saaj.client.p2p; - -import java.io.*; -import java.lang.reflect.Method; -import java.net.*; -import java.security.*; -import java.util.Iterator; -import java.util.StringTokenizer; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.xml.soap.*; - -import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; -import com.sun.xml.internal.messaging.saaj.util.*; - -/** - * This represents a "connection" to the simple HTTP-based provider. - * - * @author Anil Vijendran (akv@eng.sun.com) - * @author Rajiv Mordani (rajiv.mordani@sun.com) - * @author Manveen Kaur (manveen.kaur@sun.com) - * - */ -class HttpSOAPConnection extends SOAPConnection { - - public static final String vmVendor = SAAJUtil.getSystemProperty("java.vendor.url"); - private static final String sunVmVendor = "http://java.sun.com/"; - private static final String ibmVmVendor = "http://www.ibm.com/"; - private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false; - private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false; - private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint"; - - protected static final Logger log = - Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN, - "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings"); - - - MessageFactory messageFactory = null; - - boolean closed = false; - - public HttpSOAPConnection() throws SOAPException { - - try { - messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL); - } catch (NoSuchMethodError ex) { - //fallback to default SOAP 1.1 in this case for backward compatibility - messageFactory = MessageFactory.newInstance(); - } catch (Exception ex) { - log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex); - throw new SOAPExceptionImpl("Unable to create message factory", ex); - } - } - - public void close() throws SOAPException { - if (closed) { - log.severe("SAAJ0002.p2p.close.already.closed.conn"); - throw new SOAPExceptionImpl("Connection already closed"); - } - - messageFactory = null; - closed = true; - } - - public SOAPMessage call(SOAPMessage message, Object endPoint) - throws SOAPException { - if (closed) { - log.severe("SAAJ0003.p2p.call.already.closed.conn"); - throw new SOAPExceptionImpl("Connection is closed"); - } - - Class urlEndpointClass = null; - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - try { - if (loader != null) { - urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT); - } else { - urlEndpointClass = Class.forName(JAXM_URLENDPOINT); - } - } catch (ClassNotFoundException ex) { - //Do nothing. URLEndpoint is available only when JAXM is there. - if (log.isLoggable(Level.FINEST)) - log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM"); - } - - if (urlEndpointClass != null) { - if (urlEndpointClass.isInstance(endPoint)) { - String url = null; - - try { - Method m = urlEndpointClass.getMethod("getURL", (Class[])null); - url = (String) m.invoke(endPoint, (Object[])null); - } catch (Exception ex) { - // TBD -- exception chaining - log.log(Level.SEVERE,"SAAJ0004.p2p.internal.err",ex); - throw new SOAPExceptionImpl( - "Internal error: " + ex.getMessage()); - } - try { - endPoint = new URL(url); - } catch (MalformedURLException mex) { - log.log(Level.SEVERE,"SAAJ0005.p2p.", mex); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - } - - if (endPoint instanceof java.lang.String) { - try { - endPoint = new URL((String) endPoint); - } catch (MalformedURLException mex) { - log.log(Level.SEVERE, "SAAJ0006.p2p.bad.URL", mex); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - - if (endPoint instanceof URL) - try { - SOAPMessage response = post(message, (URL)endPoint); - return response; - } catch (Exception ex) { - // TBD -- chaining? - throw new SOAPExceptionImpl(ex); - } else { - log.severe("SAAJ0007.p2p.bad.endPoint.type"); - throw new SOAPExceptionImpl("Bad endPoint type " + endPoint); - } - } - - SOAPMessage post(SOAPMessage message, URL endPoint) throws SOAPException, IOException { - boolean isFailure = false; - - URL url = null; - HttpURLConnection httpConnection = null; - - int responseCode = 0; - try { - if (endPoint.getProtocol().equals("https")) - //if(!setHttps) - initHttps(); - // Process the URL - URI uri = new URI(endPoint.toString()); - String userInfo = uri.getRawUserInfo(); - - url = endPoint; - - if (dL > 0) - d("uri: " + userInfo + " " + url + " " + uri); - - // TBD - // Will deal with https later. - if (!url.getProtocol().equalsIgnoreCase("http") - && !url.getProtocol().equalsIgnoreCase("https")) { - log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https"); - throw new IllegalArgumentException( - "Protocol " - + url.getProtocol() - + " not supported in URL " - + url); - } - httpConnection = (HttpURLConnection) createConnection(url); - - httpConnection.setRequestMethod("POST"); - - httpConnection.setDoOutput(true); - httpConnection.setDoInput(true); - httpConnection.setUseCaches(false); - httpConnection.setInstanceFollowRedirects(true); - - if (message.saveRequired()) - message.saveChanges(); - - MimeHeaders headers = message.getMimeHeaders(); - - Iterator it = headers.getAllHeaders(); - boolean hasAuth = false; // true if we find explicit Auth header - while (it.hasNext()) { - MimeHeader header = (MimeHeader) it.next(); - - String[] values = headers.getHeader(header.getName()); - if (values.length == 1) - httpConnection.setRequestProperty( - header.getName(), - header.getValue()); - else { - StringBuffer concat = new StringBuffer(); - int i = 0; - while (i < values.length) { - if (i != 0) - concat.append(','); - concat.append(values[i]); - i++; - } - - httpConnection.setRequestProperty( - header.getName(), - concat.toString()); - } - - if ("Authorization".equals(header.getName())) { - hasAuth = true; - if (log.isLoggable(Level.FINE)) - log.fine("SAAJ0091.p2p.https.auth.in.POST.true"); - } - } - - if (!hasAuth && userInfo != null) { - initAuthUserInfo(httpConnection, userInfo); - } - - OutputStream out = httpConnection.getOutputStream(); - try { - message.writeTo(out); - out.flush(); - } finally { - out.close(); - } - - httpConnection.connect(); - - try { - - responseCode = httpConnection.getResponseCode(); - - // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } - //else if (responseCode != HttpURLConnection.HTTP_OK) - //else if (!(responseCode >= HttpURLConnection.HTTP_OK && responseCode < 207)) - else if ((responseCode / 100) != 2) { - log.log(Level.SEVERE, - "SAAJ0008.p2p.bad.response", - new String[] {httpConnection.getResponseMessage()}); - throw new SOAPExceptionImpl( - "Bad response: (" - + responseCode - + httpConnection.getResponseMessage()); - - } - } catch (IOException e) { - // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds! - responseCode = httpConnection.getResponseCode(); - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } else { - throw e; - } - - } - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.severe("SAAJ0009.p2p.msg.send.failed"); - throw new SOAPExceptionImpl("Message send failed", ex); - } - - SOAPMessage response = null; - InputStream httpIn = null; - if (responseCode == HttpURLConnection.HTTP_OK || isFailure) { - try { - MimeHeaders headers = new MimeHeaders(); - - String key, value; - - // Header field 0 is the status line so we skip it. - - int i = 1; - - while (true) { - key = httpConnection.getHeaderFieldKey(i); - value = httpConnection.getHeaderField(i); - - if (key == null && value == null) - break; - - if (key != null) { - StringTokenizer values = - new StringTokenizer(value, ","); - while (values.hasMoreTokens()) - headers.addHeader(key, values.nextToken().trim()); - } - i++; - } - - httpIn = - (isFailure - ? httpConnection.getErrorStream() - : httpConnection.getInputStream()); - - byte[] bytes = readFully(httpIn); - - int length = - httpConnection.getContentLength() == -1 - ? bytes.length - : httpConnection.getContentLength(); - - // If no reply message is returned, - // content-Length header field value is expected to be zero. - if (length == 0) { - response = null; - log.warning("SAAJ0014.p2p.content.zero"); - } else { - ByteInputStream in = new ByteInputStream(bytes, length); - response = messageFactory.createMessage(headers, in); - } - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.log(Level.SEVERE,"SAAJ0010.p2p.cannot.read.resp", ex); - throw new SOAPExceptionImpl( - "Unable to read response: " + ex.getMessage()); - } finally { - if (httpIn != null) - httpIn.close(); - httpConnection.disconnect(); - } - } - return response; - } - - // Object identifies where the request should be sent. - // It is required to support objects of type String and java.net.URL. - - public SOAPMessage get(Object endPoint) throws SOAPException { - if (closed) { - log.severe("SAAJ0011.p2p.get.already.closed.conn"); - throw new SOAPExceptionImpl("Connection is closed"); - } - Class urlEndpointClass = null; - - try { - urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint"); - } catch (Exception ex) { - //Do nothing. URLEndpoint is available only when JAXM is there. - } - - if (urlEndpointClass != null) { - if (urlEndpointClass.isInstance(endPoint)) { - String url = null; - - try { - Method m = urlEndpointClass.getMethod("getURL", (Class[])null); - url = (String) m.invoke(endPoint, (Object[])null); - } catch (Exception ex) { - log.severe("SAAJ0004.p2p.internal.err"); - throw new SOAPExceptionImpl( - "Internal error: " + ex.getMessage()); - } - try { - endPoint = new URL(url); - } catch (MalformedURLException mex) { - log.severe("SAAJ0005.p2p."); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - } - - if (endPoint instanceof java.lang.String) { - try { - endPoint = new URL((String) endPoint); - } catch (MalformedURLException mex) { - log.severe("SAAJ0006.p2p.bad.URL"); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - - if (endPoint instanceof URL) - try { - SOAPMessage response = doGet((URL)endPoint); - return response; - } catch (Exception ex) { - throw new SOAPExceptionImpl(ex); - } else - throw new SOAPExceptionImpl("Bad endPoint type " + endPoint); - } - - SOAPMessage doGet(URL endPoint) throws SOAPException, IOException { - boolean isFailure = false; - - URL url = null; - HttpURLConnection httpConnection = null; - - int responseCode = 0; - try { - /// Is https GET allowed?? - if (endPoint.getProtocol().equals("https")) - initHttps(); - // Process the URL - URI uri = new URI(endPoint.toString()); - String userInfo = uri.getRawUserInfo(); - - url = endPoint; - - if (dL > 0) - d("uri: " + userInfo + " " + url + " " + uri); - - // TBD - // Will deal with https later. - if (!url.getProtocol().equalsIgnoreCase("http") - && !url.getProtocol().equalsIgnoreCase("https")) { - log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https"); - throw new IllegalArgumentException( - "Protocol " - + url.getProtocol() - + " not supported in URL " - + url); - } - httpConnection = (HttpURLConnection) createConnection(url); - - httpConnection.setRequestMethod("GET"); - - httpConnection.setDoOutput(true); - httpConnection.setDoInput(true); - httpConnection.setUseCaches(false); - httpConnection.setFollowRedirects(true); - - httpConnection.connect(); - - try { - - responseCode = httpConnection.getResponseCode(); - - // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } else if ((responseCode / 100) != 2) { - log.log(Level.SEVERE, - "SAAJ0008.p2p.bad.response", - new String[] { httpConnection.getResponseMessage()}); - throw new SOAPExceptionImpl( - "Bad response: (" - + responseCode - + httpConnection.getResponseMessage()); - - } - } catch (IOException e) { - // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds! - responseCode = httpConnection.getResponseCode(); - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } else { - throw e; - } - - } - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.severe("SAAJ0012.p2p.get.failed"); - throw new SOAPExceptionImpl("Get failed", ex); - } - - SOAPMessage response = null; - InputStream httpIn = null; - if (responseCode == HttpURLConnection.HTTP_OK || isFailure) { - try { - MimeHeaders headers = new MimeHeaders(); - - String key, value; - - // Header field 0 is the status line so we skip it. - - int i = 1; - - while (true) { - key = httpConnection.getHeaderFieldKey(i); - value = httpConnection.getHeaderField(i); - - if (key == null && value == null) - break; - - if (key != null) { - StringTokenizer values = - new StringTokenizer(value, ","); - while (values.hasMoreTokens()) - headers.addHeader(key, values.nextToken().trim()); - } - i++; - } - - httpIn = - (isFailure - ? httpConnection.getErrorStream() - : httpConnection.getInputStream()); - // If no reply message is returned, - // content-Length header field value is expected to be zero. - // java SE 6 documentation says : - // available() : an estimate of the number of bytes that can be read - //(or skipped over) from this input stream without blocking - //or 0 when it reaches the end of the input stream. - if ((httpIn == null ) - || (httpConnection.getContentLength() == 0) - || (httpIn.available() == 0)) { - response = null; - log.warning("SAAJ0014.p2p.content.zero"); - } else { - response = messageFactory.createMessage(headers, httpIn); - } - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.log(Level.SEVERE, - "SAAJ0010.p2p.cannot.read.resp", - ex); - throw new SOAPExceptionImpl( - "Unable to read response: " + ex.getMessage()); - } finally { - if (httpIn != null) - httpIn.close(); - httpConnection.disconnect(); - } - } - return response; - } - - private byte[] readFully(InputStream istream) throws IOException { - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - byte[] buf = new byte[1024]; - int num = 0; - - while ((num = istream.read(buf)) != -1) { - bout.write(buf, 0, num); - } - - byte[] ret = bout.toByteArray(); - - return ret; - } - - //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol"; - //private static String SSL_PROVIDER = - // "com.sun.net.ssl.internal.ssl.Provider"; - private static final String SSL_PKG; - private static final String SSL_PROVIDER; - - static { - if (isIBMVM) { - SSL_PKG ="com.ibm.net.ssl.internal.www.protocol"; - SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider"; - } else { - //if not IBM VM default to Sun. - SSL_PKG = "com.sun.net.ssl.internal.www.protocol"; - SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider"; - } - } - - private void initHttps() { - //if(!setHttps) { - String pkgs = SAAJUtil.getSystemProperty("java.protocol.handler.pkgs"); - if (log.isLoggable(Level.FINE)) - log.log(Level.FINE, "SAAJ0053.p2p.providers", new String[] { pkgs }); - - if (pkgs == null || pkgs.indexOf(SSL_PKG) < 0) { - if (pkgs == null) - pkgs = SSL_PKG; - else - pkgs = pkgs + "|" + SSL_PKG; - System.setProperty("java.protocol.handler.pkgs", pkgs); - if (log.isLoggable(Level.FINE)) - log.log(Level.FINE, "SAAJ0054.p2p.set.providers", - new String[] { pkgs }); - try { - Class c = Class.forName(SSL_PROVIDER); - Provider p = (Provider) c.newInstance(); - Security.addProvider(p); - if (log.isLoggable(Level.FINE)) - log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider", - new String[] { SSL_PROVIDER }); - //System.out.println("Added SSL_PROVIDER " + SSL_PROVIDER); - //setHttps = true; - } catch (Exception ex) { - } - } - //} - } - - private void initAuthUserInfo(HttpURLConnection conn, String userInfo) { - String user; - String password; - if (userInfo != null) { // get the user and password - //System.out.println("UserInfo= " + userInfo ); - int delimiter = userInfo.indexOf(':'); - if (delimiter == -1) { - user = ParseUtil.decode(userInfo); - password = null; - } else { - user = ParseUtil.decode(userInfo.substring(0, delimiter++)); - password = ParseUtil.decode(userInfo.substring(delimiter)); - } - - String plain = user + ":"; - byte[] nameBytes = plain.getBytes(); - byte[] passwdBytes = (password == null ? new byte[0] : password - .getBytes()); - - // concatenate user name and password bytes and encode them - byte[] concat = new byte[nameBytes.length + passwdBytes.length]; - - System.arraycopy(nameBytes, 0, concat, 0, nameBytes.length); - System.arraycopy( - passwdBytes, - 0, - concat, - nameBytes.length, - passwdBytes.length); - String auth = "Basic " + new String(Base64.encode(concat)); - conn.setRequestProperty("Authorization", auth); - if (dL > 0) - d("Adding auth " + auth); - } - } - - private static final int dL = 0; - private void d(String s) { - log.log(Level.SEVERE, - "SAAJ0013.p2p.HttpSOAPConnection", - new String[] { s }); - System.err.println("HttpSOAPConnection: " + s); - } - - private java.net.HttpURLConnection createConnection(URL endpoint) - throws IOException { - return (HttpURLConnection) endpoint.openConnection(); - } - -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.messaging.saaj.client.p2p; - -import javax.xml.soap.*; - -/** - * Implementation of the SOAPConnectionFactory - * - * @author Anil Vijendran (anil@sun.com) - */ -public class HttpSOAPConnectionFactory extends SOAPConnectionFactory { - - public SOAPConnection createConnection() - throws SOAPException - { - return new HttpSOAPConnection(); - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Unable to create Message Factory -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connection already closed (from close method) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connection already closed (from call) -SAAJ0004.p2p.internal.err=SAAJ0004: Internal error -SAAJ0005.p2p.=SAAJ0005: Bad URL (endPoint instance of javax.xml.messaging.URLEndpoint) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: Bad URL (endPoint instance of String) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Bad endPoint type (endPoint instance of URL) -SAAJ0008.p2p.bad.response=SAAJ0008: Bad Response; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: Message send failed -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Unable to read response -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connection already closed (from get) -SAAJ0012.p2p.get.failed=SAAJ0012: Get failed -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: Invalid reply message. Content length of reply was zero. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: Proxy host: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: Proxy Port: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocol not supported in URL, must be http or https -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: Providers {0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: Setting Providers {0} -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: Added SSL_PROVIDER {0} - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint is available only when JAXM is there -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS Authorization in POST set to true
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Nachrichten-Factory kann nicht erstellt werden -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Verbindung ist bereits beendet (mit close-Methode) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Verbindung ist bereits beendet (mit call) -SAAJ0004.p2p.internal.err=SAAJ0004: Interner Fehler -SAAJ0005.p2p.=SAAJ0005: Ung\u00FCltige URL (endPoint-Instanz von javax.xml.messaging.URLEndpoint) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: Ung\u00FCltige URL (endPoint-Instanz von Zeichenfolge) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Ung\u00FCltiger endPoint-Typ (endPoint-Instanz von URL) -SAAJ0008.p2p.bad.response=SAAJ0008: Ung\u00FCltige Antwort; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: Nachricht konnte nicht gesendet werden -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Antwort konnte nicht gelesen werden -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Verbindung ist bereits beendet (mit get) -SAAJ0012.p2p.get.failed=SAAJ0012: Get-Vorgang nicht erfolgreich -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: Ung\u00FCltige Antwortnachricht. Contentl\u00E4nge von Antwort war null. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: Proxyhost: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: Proxyport: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protokoll in URL nicht unterst\u00FCtzt, muss http oder https sein -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: Provider {0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: Provider {0} werden festgelegt -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} hinzugef\u00FCgt - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint ist nur verf\u00FCgbar, wenn JAXM vorhanden ist -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS-Autorisierung in POST auf "True" festgelegt
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: no se ha podido crear la f\u00E1brica de mensajes -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: la conexi\u00F3n ya est\u00E1 cerrada (desde el m\u00E9todo de cierre) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: la conexi\u00F3n ya est\u00E1 cerrada (desde la llamada) -SAAJ0004.p2p.internal.err=SAAJ0004: error interno -SAAJ0005.p2p.=SAAJ0005: URL err\u00F3nea (instancia endPoint de javax.xml.messaging.URLEndpoint) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: URL err\u00F3nea (instancia endPoint de String) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo endPoint err\u00F3neo (instancia endPoint de URL) -SAAJ0008.p2p.bad.response=SAAJ0008: respuesta err\u00F3nea; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: fallo de env\u00EDo de mensaje -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: no se ha podido leer la respuesta -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: la conexi\u00F3n ya est\u00E1 cerrada (desde la obtenci\u00F3n) -SAAJ0012.p2p.get.failed=SAAJ0012: fallo de obtenci\u00F3n -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: mensaje de respuesta no v\u00E1lido. La longitud del contenido de respuesta es cero. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: Host de proxy: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: Puerto de proxy: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: el protocolo no est\u00E1 soportado en la URL. Debe ser http o https -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: proveedores {0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: definici\u00F3n de Proveedores {0} -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: se ha agregado SSL_PROVIDER {0} - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint s\u00F3lo est\u00E1 disponible cuando JAXM est\u00E1 all\u00ED -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: la autorizaci\u00F3n de HTTPS en POST se ha definido en true
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001 : impossible de cr\u00E9er une fabrique de messages -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode de fermeture) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de l'appel) -SAAJ0004.p2p.internal.err=SAAJ0004 : erreur interne -SAAJ0005.p2p.=SAAJ0005 : URL incorrecte (instance d'adresse de javax.xml.messaging.URLEndpoint) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006 : URL incorrecte (instance d'adresse de la cha\u00EEne) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007 : type d'adresse incorrect (instance d'adresse de l'URL) -SAAJ0008.p2p.bad.response=SAAJ0008 : r\u00E9ponse incorrecte ; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009 : \u00E9chec de l'envoi du message -SAAJ0010.p2p.cannot.read.resp=SAAJ0010 : impossible de lire la r\u00E9ponse -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode get) -SAAJ0012.p2p.get.failed=SAAJ0012 : \u00E9chec de la m\u00E9thode get -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013 : HttpSOAPConnection : {0} -SAAJ0014.p2p.content.zero=SAAJ0014 : message de r\u00E9ponse non valide. La longueur du contenu de la r\u00E9ponse \u00E9tait de z\u00E9ro. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050 : h\u00F4te proxy : {0} -SAAJ0051.p2p.proxy.port=SAAJ0051 : port proxy : {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052 : protocole non pris en charge dans l'URL, il doit s'agir de http ou https -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053 : fournisseurs {0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054 : d\u00E9finition des fournisseurs {0} -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055 : SSL_PROVIDER {0} ajout\u00E9 - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090 : URLEndpoint est disponible uniquement lorsque JAXM est pr\u00E9sent -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091 : autorisation HTTPS dans POST d\u00E9finie sur True
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Impossibile creare il message factory -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connessione gi\u00E0 chiusa (dal metodo close) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connessione gi\u00E0 chiusa (dal metodo call) -SAAJ0004.p2p.internal.err=SAAJ0004: Errore interno -SAAJ0005.p2p.=SAAJ0005: URL non valido (istanza endPoint di javax.xml.messaging.URLEndpoint) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: URL non valido (istanza endPoint di String) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Tipo endPoint non valido (istanza endPoint dell'URL) -SAAJ0008.p2p.bad.response=SAAJ0008: Risposta non valida; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: Invio del messaggio non riuscito -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Impossibile leggere la risposta -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connessione gi\u00E0 chiusa (dal metodo get) -SAAJ0012.p2p.get.failed=SAAJ0012: Metodo get non riuscito -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: Messaggio di risposta non valido. La lunghezza del contenuto della risposta era pari a zero. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: Host proxy: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: Porta proxy: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocollo non supportato nell'URL, deve essere http o https -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: Provider {0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: Impostazione dei provider {0} -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} aggiunto - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: L'endpoint dell'URL \u00E8 disponibile solo quando \u00E8 presente JAXM -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: Autorizzazione HTTPS in POST impostata su true
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: (close\u30E1\u30BD\u30C3\u30C9\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059 -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: (call\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059 -SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u30A8\u30E9\u30FC -SAAJ0005.p2p.=SAAJ0005: \u7121\u52B9\u306AURL (javax.xml.messaging.URLEndpoint\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: \u7121\u52B9\u306AURL (\u6587\u5B57\u5217\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u7121\u52B9\u306AendPoint\u30BF\u30A4\u30D7(URL\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9) -SAAJ0008.p2p.bad.response=SAAJ0008: \u4E0D\u6B63\u306A\u30EC\u30B9\u30DD\u30F3\u30B9; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u30E1\u30C3\u30BB\u30FC\u30B8\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093 -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: (get\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059 -SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: \u5FDC\u7B54\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7121\u52B9\u3067\u3059\u3002\u5FDC\u7B54\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u9577\u304C\u30BC\u30ED\u3067\u3057\u305F\u3002 - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DB\u30B9\u30C8: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DD\u30FC\u30C8: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u3059\u3002http\u307E\u305F\u306Fhttps\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: \u30D7\u30ED\u30D0\u30A4\u30C0{0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: \u30D7\u30ED\u30D0\u30A4\u30C0{0}\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u307E\u3059 -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint\u3092\u4F7F\u7528\u3067\u304D\u308B\u306E\u306FJAXM\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306E\u307F\u3067\u3059 -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\u306EHTTPS\u8A8D\u8A3C\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \uBA54\uC2DC\uC9C0 \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: close \uBA54\uC18C\uB4DC\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \uD638\uCD9C\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. -SAAJ0004.p2p.internal.err=SAAJ0004: \uB0B4\uBD80 \uC624\uB958 -SAAJ0005.p2p.=SAAJ0005: URL(javax.xml.messaging.URLEndpoint\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: URL(\uBB38\uC790\uC5F4\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \uB05D\uC810 \uC720\uD615(URL\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. -SAAJ0008.p2p.bad.response=SAAJ0008: \uC798\uBABB\uB41C \uC751\uB2F5: {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: \uBA54\uC2DC\uC9C0 \uC804\uC1A1\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \uC751\uB2F5\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \uAC00\uC838\uC624\uAE30\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. -SAAJ0012.p2p.get.failed=SAAJ0012: \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: \uD68C\uC2E0 \uBA54\uC2DC\uC9C0\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uD68C\uC2E0\uC758 \uCF58\uD150\uCE20 \uAE38\uC774\uAC00 0\uC785\uB2C8\uB2E4. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: \uD504\uB85D\uC2DC \uD638\uC2A4\uD2B8: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: \uD504\uB85D\uC2DC \uD3EC\uD2B8: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uD504\uB85C\uD1A0\uCF5C\uC785\uB2C8\uB2E4. http \uB610\uB294 https\uC5EC\uC57C \uD569\uB2C8\uB2E4. -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: {0} \uC81C\uACF5\uC790 -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: {0} \uC81C\uACF5\uC790\uB97C \uC124\uC815\uD558\uB294 \uC911 -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\uC744(\uB97C) \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4. - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: JAXM\uC774 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC URLEndpoint\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\uC758 HTTPS \uAD8C\uD55C \uBD80\uC5EC\uAC00 true\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: n\u00E3o \u00E9 poss\u00EDvel criar a factory da mensagem -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: a conex\u00E3o j\u00E1 foi fechada (do m\u00E9todo de fechamento) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: conex\u00E3o j\u00E1 fechada (da chamada) -SAAJ0004.p2p.internal.err=SAAJ0004: erro interno -SAAJ0005.p2p.=SAAJ0005: URL incorreto (a inst\u00E2ncia do endPoint de javax.xml.messaging.URLEndpoint) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: URL incorreto (inst\u00E2ncia de endPoint da String) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo de endPoint incorreto (inst\u00E2ncia de endPoint do URL) -SAAJ0008.p2p.bad.response=SAAJ0008: Resposta Incorreta; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: falha no envio da mensagem -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: n\u00E3o \u00E9 poss\u00EDvel ler a resposta -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: conex\u00E3o j\u00E1 fechada (de get) -SAAJ0012.p2p.get.failed=SAAJ0012: falha de get -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: mensagem de resposta inv\u00E1lida. O tamanho do conte\u00FAdo da resposta era zero. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: host proxy: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: porta proxy: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: protocolo n\u00E3o suportado no URL, deve ser http ou https -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: provedores {0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: definindo provedores {0} -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} adicionado - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint est\u00E1 dispon\u00EDvel s\u00F3 quando JAXM est\u00E1 presente -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: autoriza\u00E7\u00E3o de HTTPS no POST definida como verdadeira
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F\u5DE5\u5382 -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE close \u65B9\u6CD5) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE\u8C03\u7528) -SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u9519\u8BEF -SAAJ0005.p2p.=SAAJ0005: URL \u9519\u8BEF (javax.xml.messaging.URLEndpoint \u7684 endPoint \u5B9E\u4F8B) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: URL \u9519\u8BEF (\u5B57\u7B26\u4E32\u7684 endPoint \u5B9E\u4F8B) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: endPoint \u7C7B\u578B\u9519\u8BEF (URL \u7684 endPoint \u5B9E\u4F8B) -SAAJ0008.p2p.bad.response=SAAJ0008: \u54CD\u5E94\u9519\u8BEF; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u672A\u80FD\u53D1\u9001\u6D88\u606F -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u65E0\u6CD5\u8BFB\u53D6\u54CD\u5E94 -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE get \u65B9\u6CD5) -SAAJ0012.p2p.get.failed=SAAJ0012: Get \u5931\u8D25 -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: \u56DE\u590D\u6D88\u606F\u65E0\u6548\u3002\u56DE\u590D\u7684\u5185\u5BB9\u957F\u5EA6\u4E3A\u96F6\u3002 - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u673A: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u7AEF\u53E3: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL \u4E2D\u4E0D\u652F\u6301\u534F\u8BAE, \u5FC5\u987B\u662F http \u6216 https -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u65B9{0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: \u8BBE\u7F6E\u63D0\u4F9B\u65B9{0} -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u6DFB\u52A0 SSL_PROVIDER {0} - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u4F7F\u7528 JAXM \u65F6, URLEndpoint \u624D\u53EF\u7528 -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6743\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# SAAJ ResourceBundle properties file -# Contains Log messages -# Error messages -SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F\u8655\u7406\u7AD9 -SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u95DC\u9589\u65B9\u6CD5) -SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u547C\u53EB) -SAAJ0004.p2p.internal.err=SAAJ0004: \u5167\u90E8\u932F\u8AA4 -SAAJ0005.p2p.=SAAJ0005: \u932F\u8AA4\u7684 URL (javax.xml.messaging.URLEndpoint \u7684 endPoint \u57F7\u884C\u8655\u7406) -# 0005 : getURL failed on javax.xml.messaging.URLEndpoint -SAAJ0006.p2p.bad.URL=SAAJ0006: \u932F\u8AA4\u7684 URL (\u5B57\u4E32\u7684 endPoint \u57F7\u884C\u8655\u7406) -SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u932F\u8AA4\u7684 endPoint \u985E\u578B (URL \u7684 endPoint \u57F7\u884C\u8655\u7406) -SAAJ0008.p2p.bad.response=SAAJ0008: \u932F\u8AA4\u7684\u56DE\u61C9; {0} -SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u8A0A\u606F\u50B3\u9001\u5931\u6557 -SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u7121\u6CD5\u8B80\u53D6\u56DE\u61C9 -SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u53D6\u5F97) -SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u5931\u6557 -SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0} -SAAJ0014.p2p.content.zero=SAAJ0014: \u7121\u6548\u7684\u56DE\u8986\u8A0A\u606F. \u56DE\u8986\u7684\u5167\u5BB9\u9577\u5EA6\u70BA\u96F6. - -# Debug messages -SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u6A5F: {0} -SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0: {0} -SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: \u4E0D\u652F\u63F4 URL \u4E2D\u7684\u5354\u5B9A, \u5FC5\u9808\u662F http \u6216 https -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u8005 {0} -# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo") -SAAJ0054.p2p.set.providers=SAAJ0054: \u8A2D\u5B9A\u63D0\u4F9B\u8005 {0} -# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider" -SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u65B0\u589E SSL_PROVIDER {0} - -# Trace messages -SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u6709 JAXM \u6642\u624D\u80FD\u4F7F\u7528 URLEndpoint -SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6B0A\u8A2D\u70BA true
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)Header.java 1.3 02/03/27 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime; - - -/** - * The Header class stores a name/value pair to represent headers. - * - * @author John Mani - */ - -public interface Header { - - /** - * Returns the name of this header. - * - * @return name of the header - */ - String getName(); - - /** - * Returns the value of this header. - * - * @return value of the header - */ - String getValue(); -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MessagingException.java 1.10 02/06/13 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime; - - -/** - * The base class for all exceptions thrown by the Messaging classes - * - * @author John Mani - * @author Bill Shannon - */ - -public class MessagingException extends Exception { - - /** - * The next exception in the chain. - * - * @serial - */ - private Exception next; - - /** - * Constructs a MessagingException with no detail message. - */ - public MessagingException() { - super(); - } - - /** - * Constructs a MessagingException with the specified detail message. - * @param s the detail message - */ - public MessagingException(String s) { - super(s); - } - - /** - * Constructs a MessagingException with the specified - * Exception and detail message. The specified exception is chained - * to this exception. - * @param s the detail message - * @param e the embedded exception - * @see #getNextException - * @see #setNextException - */ - public MessagingException(String s, Exception e) { - super(s); - next = e; - } - - /** - * Get the next exception chained to this one. If the - * next exception is a MessagingException, the chain - * may extend further. - * - * @return next Exception, null if none. - */ - public synchronized Exception getNextException() { - return next; - } - - /** - * Add an exception to the end of the chain. If the end - * is <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(); - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MultipartDataSource.java 1.6 02/03/27 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart; - -import javax.activation.DataSource; - -/** - * MultipartDataSource is a <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; - -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,765 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MimeMultipart.java 1.31 03/01/29 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - -import java.io.*; -import java.util.BitSet; - -import javax.activation.DataSource; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.*; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*; - -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; - -/** - * The MimeMultipart class is an implementation of the abstract Multipart - * class that uses MIME conventions for the multipart data. <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; - BitSet eof = new BitSet(1); - long[] posVector = new long[1]; - - while (true) { - is.mark(l); - readNext(is, buffer, l, eof, posVector, sin); - if (eof.get(0)) { - // End of stream - return false; - } - - /* - if (bufferLength < l) { - //is.reset(); - return false; - }*/ - - for(i = lx; i >= 0; i--) { - if (buffer[i] != pattern[i]) { - break; - } - } - - if (i < 0) { - // found the boundary, skip *LWSP-char and CRLF - if (!skipLWSPAndCRLF(is)) { - throw new Exception("Boundary does not terminate with CRLF"); - } - return true; - } - - int s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]); - is.reset(); - is.skip(s); - } - } - - public boolean find( - InputStream is, byte[] pattern, long[] posVector, - ByteOutputStream out, SharedInputStream sin) throws Exception { - int i; - int l = pattern.length; - int lx = l -1; - int bufferLength = 0; - int s = 0; - long endPos = -1; - byte[] tmp = null; - - boolean first = true; - BitSet eof = new BitSet(1); - - while (true) { - is.mark(l); - if (!first) { - tmp = prevBuffer; - prevBuffer = buffer; - buffer = tmp; - } - if (sin != null) { - endPos = sin.getPosition(); - } - - bufferLength = readNext(is, buffer, l, eof, posVector, sin); - - if (bufferLength == -1) { - // End of stream - // looks like it is allowed to not have a closing boundary - //return false; - //if (sin != null) { - // posVector[0] = endPos; - //} - b = -1; - if ((s == l) && (sin == null)) { - out.write(prevBuffer, 0, s); - } - return true; - } - - if (bufferLength < l) { - if (sin != null) { - //endPos = sin.getPosition(); - //posVector[0] = endPos; - } else { - // looks like it is allowed to not have a closing boundary - // in the old implementation - out.write(buffer, 0, bufferLength); - } - // looks like it is allowed to not have a closing boundary - // in the old implementation - //return false; - b = -1; - return true; - } - - for(i = lx; i >= 0; i--) { - if (buffer[i] != pattern[i]) { - break; - } - } - - if (i < 0) { - if (s > 0) { - //looks like the earlier impl allowed just an LF - // so if s == 1 : it must be an LF - // if s == 2 : it must be a CR LF - if (s <= 2) { - //it could be "some-char\n" so write some-char - if (s == 2) { - if (prevBuffer[1] == '\n') { - if (prevBuffer[0] != '\r' && prevBuffer[0] != '\n') { - out.write(prevBuffer,0,1); - } - if (sin != null) { - posVector[0] = endPos; - } - - } else { - throw new Exception( - "Boundary characters encountered in part Body " + - "without a preceeding CRLF"); - } - - } else if (s==1) { - if (prevBuffer[0] != '\n') { - throw new Exception( - "Boundary characters encountered in part Body " + - "without a preceeding CRLF"); - }else { - if (sin != null) { - posVector[0] = endPos; - } - } - } - - } else if (s > 2) { - if ((prevBuffer[s-2] == '\r') && (prevBuffer[s-1] == '\n')) { - if (sin != null) { - posVector[0] = endPos - 2; - } else { - out.write(prevBuffer, 0, s - 2); - } - } else if (prevBuffer[s-1] == '\n') { - //old impl allowed just a \n - if (sin != null) { - posVector[0] = endPos - 1; - } else { - out.write(prevBuffer, 0, s - 1); - } - } else { - throw new Exception( - "Boundary characters encountered in part Body " + - "without a preceeding CRLF"); - } - } - } - // found the boundary, skip *LWSP-char and CRLF - if (!skipLWSPAndCRLF(is)) { - //throw new Exception( - // "Boundary does not terminate with CRLF"); - } - return true; - } - - if ((s > 0) && (sin == null)) { - if (prevBuffer[s-1] == (byte)13) { - // if buffer[0] == (byte)10 - if (buffer[0] == (byte)10) { - int j; - for(j = lx-1; j > 0; j--) { - if (buffer[j+1] != pattern[j]) { - break; - } - } - if (j == 0) { - // matched the pattern excluding the last char of the pattern - // so dont write the CR into stream - out.write(prevBuffer,0,s-1); - } else { - out.write(prevBuffer,0,s); - } - } else { - out.write(prevBuffer, 0, s); - } - } else { - out.write(prevBuffer, 0, s); - } - } - - s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]); - is.reset(); - is.skip(s); - if (first) { - first = false; - } - } - } - - private boolean skipLWSPAndCRLF(InputStream is) throws Exception { - - b = is.read(); - //looks like old impl allowed just a \n as well - if (b == '\n') { - return true; - } - - if (b == '\r') { - b = is.read(); - //skip any multiple '\r' "\r\n" --> "\r\r\n" on Win2k - if (b == '\r') { - b = is.read(); - } - if (b == '\n') { - return true; - } else { - throw new Exception( - "transport padding after a Mime Boundary should end in a CRLF, found CR only"); - } - } - - if (b == '-') { - b = is.read(); - if (b != '-') { - throw new Exception( - "Unexpected singular '-' character after Mime Boundary"); - } else { - //System.out.println("Last Part Found"); - lastPartFound.flip(0); - // read the next char - b = is.read(); - } - } - - while ((b != -1) && ((b == ' ') || (b == '\t'))) { - b = is.read(); - if (b == '\n') { - return true; - } - if (b == '\r') { - b = is.read(); - //skip any multiple '\r': "\r\n" --> "\r\r\n" on Win2k - if (b == '\r') { - b = is.read(); - } - if (b == '\n') { - return true; - } - } - } - - if (b == -1) { - // the last boundary need not have CRLF - if (!lastPartFound.get(0)) { - throw new Exception( - "End of Multipart Stream before encountering closing boundary delimiter"); - } - return true; - } - return false; - } - - private void compile(byte[] pattern) { - int l = pattern.length; - - int i; - int j; - - // Copied from J2SE 1.4 regex code - // java.util.regex.Pattern.java - - // Initialise Bad Character Shift table - for (i = 0; i < l; i++) { - bcs[pattern[i]] = i + 1; - } - - // Initialise Good Suffix Shift table - gss = new int[l]; - NEXT: for (i = l; i > 0; i--) { - // j is the beginning index of suffix being considered - for (j = l - 1; j >= i; j--) { - // Testing for good suffix - if (pattern[j] == pattern[j - i]) { - // pattern[j..len] is a good suffix - gss[j - 1] = i; - } else { - // No match. The array has already been - // filled up with correct values before. - continue NEXT; - } - } - while (j > 0) { - gss[--j] = i; - } - } - gss[l - 1] = 1; - } - - - /** - * Iterates through all the parts and outputs each Mime part - * separated by a boundary. - */ - - public void writeTo(OutputStream os) - throws IOException, MessagingException { - - // inputStream was not null - if (in != null) { - contentType.setParameter("boundary", this.boundary); - } - - String bnd = "--" + contentType.getParameter("boundary"); - for (int i = 0; i < parts.size(); i++) { - OutputUtil.writeln(bnd, os); // put out boundary - ((MimeBodyPart)parts.get(i)).writeTo(os); - OutputUtil.writeln(os); // put out empty line - } - - if (in != null) { - OutputUtil.writeln(bnd, os); // put out boundary - if ((os instanceof ByteOutputStream) && lazyAttachments) { - ((ByteOutputStream) os).write(in); - } else { - ByteOutputStream baos = null; - try { - baos = new ByteOutputStream(in.available()); - baos.write(in); - baos.writeTo(os); - // reset the inputstream so that we can support a - // getAttachment later - in = baos.newInputStream(); - } finally { - if (baos != null) - baos.close(); - } - } - - // this will endup writing the end boundary - } else { - // put out last boundary - OutputUtil.writeAsAscii(bnd, os); - OutputUtil.writeAsAscii("--", os); - } - } - - public void setInputStream(InputStream is) { - this.in = is; - } - - public InputStream getInputStream() { - return this.in; - } - - public void setBoundary(String bnd) { - this.boundary = bnd; - if (this.contentType != null) { - this.contentType.setParameter("boundary", bnd); - } - } - public String getBoundary() { - return this.boundary; - } - - public boolean isEndOfStream() { - return (b == -1); - } - - public void setLazyAttachments(boolean flag) { - lazyAttachments = flag; - } - -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)ContentDisposition.java 1.6 02/03/27 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - - -/** - * This class represents a MIME ContentDisposition value. It provides - * methods to parse a ContentDisposition string into individual components - * and to generate a MIME style ContentDisposition string. - * - * @version 1.6, 02/03/27 - * @author John Mani - */ - -public class ContentDisposition { - - private String disposition; // disposition - private ParameterList list; // parameter list - - /** - * No-arg Constructor. - */ - public ContentDisposition() { } - - /** - * Constructor. - * - * @param disposition disposition - * @param list ParameterList - * @since JavaMail 1.2 - */ - public ContentDisposition(String disposition, ParameterList list) { - this.disposition = disposition; - this.list = list; - } - - /** - * Constructor that takes a ContentDisposition string. The String - * is parsed into its constituents: dispostion and parameters. - * A ParseException is thrown if the parse fails. - * - * @param s the ContentDisposition string. - * @exception ParseException if the parse fails. - * @since JavaMail 1.2 - */ - public ContentDisposition(String s) throws ParseException { - HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME); - HeaderTokenizer.Token tk; - - // First "disposition" .. - tk = h.next(); - if (tk.getType() != HeaderTokenizer.Token.ATOM) - throw new ParseException(); - disposition = tk.getValue(); - - // Then parameters .. - String rem = h.getRemainder(); - if (rem != null) - list = new ParameterList(rem); - } - - /** - * Return the disposition value. - * @return the disposition - * @since JavaMail 1.2 - */ - public String getDisposition() { - return disposition; - } - - /** - * Return the specified parameter value. Returns <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(); - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,277 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)ContentType.java 1.7 02/03/27 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - - -/** - * This class represents a MIME ContentType value. It provides - * methods to parse a ContentType string into individual components - * and to generate a MIME style ContentType string. - * - * @version 1.7, 02/03/27 - * @author John Mani - */ -public final class ContentType { - - private String primaryType; // primary type - private String subType; // subtype - private ParameterList list; // parameter list - - /** - * No-arg Constructor. - */ - public ContentType() { } - - /** - * Constructor. - * - * @param primaryType primary type - * @param subType subType - * @param list ParameterList - */ - public ContentType(String primaryType, String subType, - ParameterList list) { - this.primaryType = primaryType; - this.subType = subType; - if (list == null) - list = new ParameterList(); - this.list = list; - } - - /** - * Constructor that takes a Content-Type string. The String - * is parsed into its constituents: primaryType, subType - * and parameters. A ParseException is thrown if the parse fails. - * - * @param s the Content-Type string. - * @exception ParseException if the parse fails. - */ - public ContentType(String s) throws ParseException { - HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME); - HeaderTokenizer.Token tk; - - // First "type" .. - tk = h.next(); - if (tk.getType() != HeaderTokenizer.Token.ATOM) - throw new ParseException(); - primaryType = tk.getValue(); - - // The '/' separator .. - tk = h.next(); - if ((char)tk.getType() != '/') - throw new ParseException(); - - // Then "subType" .. - tk = h.next(); - if (tk.getType() != HeaderTokenizer.Token.ATOM) - throw new ParseException(); - subType = tk.getValue(); - - // Finally parameters .. - String rem = h.getRemainder(); - if (rem != null) - list = new ParameterList(rem); - } - - public ContentType copy() { - return new ContentType(primaryType,subType,list.copy()); - } - - /** - * Return the primary type. - * @return the primary type - */ - public String getPrimaryType() { - return primaryType; - } - - /** - * Return the subType. - * @return the subType - */ - public String getSubType() { - return subType; - } - - /** - * Return the MIME type string, without the parameters. - * The returned value is basically the concatenation of - * the primaryType, the '/' character and the secondaryType. - * - * @return the type - */ - public String getBaseType() { - return primaryType + '/' + subType; - } - - /** - * Return the specified parameter value. Returns <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; - } - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,382 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)HeaderTokenizer.java 1.9 02/03/27 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - - -/** - * This class tokenizes RFC822 and MIME headers into the basic - * symbols specified by RFC822 and MIME. <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(); - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,402 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)InternetHeaders.java 1.16 02/08/08 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; -import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream; -import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; - -import java.io.IOException; -import java.io.InputStream; -import java.util.AbstractList; -import java.util.List; -import java.util.NoSuchElementException; - -/** - * InternetHeaders is a utility class that manages RFC822 style - * headers. Given an RFC822 format message stream, it reads lines - * until the blank line that indicates end of header. The input stream - * is positioned at the start of the body. The lines are stored - * within the object and can be extracted as either Strings or - * {@link Header} objects. <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); - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1165 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MimeBodyPart.java 1.52 03/02/12 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - - -import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil; -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; -import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; - -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.activation.DataHandler; -import java.io.BufferedInputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.util.List; -import javax.activation.DataSource; -import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; - -/** - * This class represents a MIME body part. - * MimeBodyParts are contained 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 { - ByteOutputStream bos = null; - try { - bos = new ByteOutputStream(); - bos.write(is); - content = bos.getBytes(); - contentLength = bos.getCount(); - } catch (IOException ioex) { - throw new MessagingException("Error reading input stream", ioex); - } finally { - if (bos != null) - bos.close(); - } - } - - } - - /** - * Constructs a MimeBodyPart using the given header and - * content bytes. <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(); - /* - * Code flow indicates null is never returned from - * getdataHandler() - findbugs - */ - //if (dh == null) // Huh ? - // return; - - try { - String type = dh.getContentType(); - boolean composite = false; - boolean needCTHeader = getHeader("Content-Type") == null; - - ContentType cType = new ContentType(type); - if (cType.match("multipart/*")) { - // If multipart, recurse - composite = true; - Object o = dh.getContent(); - ((MimeMultipart) o).updateHeaders(); - } else if (cType.match("message/rfc822")) { - composite = true; - } - - // Content-Transfer-Encoding, but only if we don't - // already have one - if (!composite) { // not allowed on composite parts - if (getHeader("Content-Transfer-Encoding") == null) - setEncoding(MimeUtility.getEncoding(dh)); - - if (needCTHeader && setDefaultTextCharset && - cType.match("text/*") && - cType.getParameter("charset") == null) { - /* - * Set a default charset for text parts. - * We really should examine the data to determine - * whether or not it's all ASCII, but that's too - * expensive so we make an assumption: If we - * chose 7bit encoding for this data, it's probably - * ASCII. (MimeUtility.getEncoding will choose - * 7bit only in this case, but someone might've - * set the Content-Transfer-Encoding header manually.) - */ - String charset; - String enc = getEncoding(); - if (enc != null && enc.equalsIgnoreCase("7bit")) - charset = "us-ascii"; - else - charset = MimeUtility.getDefaultMIMECharset(); - cType.setParameter("charset", charset); - type = cType.toString(); - } - } - - // Now, let's update our own headers ... - - // Content-type, but only if we don't already have one - if (needCTHeader) { - /* - * Pull out "filename" from Content-Disposition, and - * use that to set the "name" parameter. This is to - * satisfy older MUAs (DtMail, Roam and probably - * a bunch of others). - */ - String s = getHeader("Content-Disposition", null); - if (s != null) { - // Parse the header .. - ContentDisposition cd = new ContentDisposition(s); - String filename = cd.getParameter("filename"); - if (filename != null) { - cType.setParameter("name", filename); - type = cType.toString(); - } - } - - setHeader("Content-Type", type); - } - } catch (IOException ex) { - throw new MessagingException("IOException updating headers", ex); - } - } - - private void setEncoding(String encoding) { - setHeader("Content-Transfer-Encoding", encoding); - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,657 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MimeMultipart.java 1.31 03/01/29 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - -import java.io.*; - -import javax.activation.DataSource; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.*; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*; -import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; -import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; - -/** - * The MimeMultipart class is an implementation - * that uses MIME conventions for the multipart data. <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; - - ByteOutputStream buf = null; - try { - // Skip the preamble - LineInputStream lin = new LineInputStream(in); - String line; - while ((line = lin.readLine()) != null) { - /* - * Strip trailing whitespace. Can't use trim method - * because it's too aggressive. Some bogus MIME - * messages will include control characters in the - * boundary string. - */ - int i; - for (i = line.length() - 1; i >= 0; i--) { - char c = line.charAt(i); - if (!(c == ' ' || c == '\t')) - break; - } - line = line.substring(0, i + 1); - if (line.equals(boundary)) - break; - } - if (line == null) - throw new MessagingException("Missing start boundary"); - - /* - * Read and process body parts until we see the - * terminating boundary line (or EOF). - */ - boolean done = false; - getparts: - while (!done) { - InternetHeaders headers = null; - if (sin != null) { - start = sin.getPosition(); - // skip headers - while ((line = lin.readLine()) != null && line.length() > 0) - ; - if (line == null) { - if (!ignoreMissingEndBoundary) { - throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers"); - } - // assume there's just a missing end boundary - break getparts; - } - } else { - // collect the headers for this body part - headers = createInternetHeaders(in); - } - - if (!in.markSupported()) - throw new MessagingException("Stream doesn't support mark"); - - buf = null; - // if we don't have a shared input stream, we copy the data - if (sin == null) - buf = new ByteOutputStream(); - int b; - boolean bol = true; // beginning of line flag - // the two possible end of line characters - int eol1 = -1, eol2 = -1; - - /* - * Read and save the content bytes in buf. - */ - for (;;) { - if (bol) { - /* - * At the beginning of a line, check whether the - * next line is a boundary. - */ - int i; - in.mark(bl + 4 + 1000); // bnd + "--\r\n" + lots of LWSP - // read bytes, matching against the boundary - for (i = 0; i < bl; i++) - if (in.read() != bndbytes[i]) - break; - if (i == bl) { - // matched the boundary, check for last boundary - int b2 = in.read(); - if (b2 == '-') { - if (in.read() == '-') { - done = true; - foundClosingBoundary = true; - break; // ignore trailing text - } - } - // skip linear whitespace - while (b2 == ' ' || b2 == '\t') - b2 = in.read(); - // check for end of line - if (b2 == '\n') - break; // got it! break out of the loop - if (b2 == '\r') { - in.mark(1); - if (in.read() != '\n') - in.reset(); - break; // got it! break out of the loop - } - } - // failed to match, reset and proceed normally - in.reset(); - - // if this is not the first line, write out the - // end of line characters from the previous line - if (buf != null && eol1 != -1) { - buf.write(eol1); - if (eol2 != -1) - buf.write(eol2); - eol1 = eol2 = -1; - } - } - - // read the next byte - if ((b = in.read()) < 0) { - done = true; - break; - } - - /* - * If we're at the end of the line, save the eol characters - * to be written out before the beginning of the next line. - */ - if (b == '\r' || b == '\n') { - bol = true; - if (sin != null) - end = sin.getPosition() - 1; - eol1 = b; - if (b == '\r') { - in.mark(1); - if ((b = in.read()) == '\n') - eol2 = b; - else - in.reset(); - } - } else { - bol = false; - if (buf != null) - buf.write(b); - } - } - - /* - * Create a MimeBody element to represent this body part. - */ - MimeBodyPart part; - if (sin != null) - part = createMimeBodyPart(sin.newStream(start, end)); - else - part = createMimeBodyPart(headers, buf.getBytes(), buf.getCount()); - addBodyPart(part); - } - } catch (IOException ioex) { - throw new MessagingException("IO Error", ioex); - } finally { - if (buf != null) - buf.close(); - } - - if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin== null) { - throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers"); - } - parsed = true; - } - - /** - * Create and return an InternetHeaders object that loads the - * headers from the given InputStream. Subclasses can override - * this method to return a subclass of InternetHeaders, if - * necessary. This implementation simply constructs and returns - * an InternetHeaders object. - * - * @param is the InputStream to read the headers from - * @exception MessagingException - * @since JavaMail 1.2 - */ - protected InternetHeaders createInternetHeaders(InputStream is) - throws MessagingException { - return new InternetHeaders(is); - } - - /** - * Create and return a MimeBodyPart object to represent a - * body part parsed from the InputStream. Subclasses can override - * this method to return a subclass of MimeBodyPart, if - * necessary. This implementation simply constructs and returns - * a MimeBodyPart object. - * - * @param headers the headers for the body part - * @param content the content of the body part - * @since JavaMail 1.2 - */ - protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content, int len) { - return new MimeBodyPart(headers, content,len); - } - - /** - * Create and return a MimeBodyPart object to represent a - * body part parsed from the InputStream. Subclasses can override - * this method to return a subclass of MimeBodyPart, if - * necessary. This implementation simply constructs and returns - * a MimeBodyPart object. - * - * @param is InputStream containing the body part - * @exception MessagingException - * @since JavaMail 1.2 - */ - protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException { - return new MimeBodyPart(is); - } - - /** - * Setup this MimeMultipart object from the given MultipartDataSource. <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; - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MimePartDataSource.java 1.9 02/03/27 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - -import java.io.*; -import java.net.UnknownServiceException; - -import javax.activation.DataSource; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; - -/** - * A utility class that implements a DataSource out of - * a MimeBodyPart. This class is primarily meant for service providers. - * - * @author John Mani - */ - -public final class MimePartDataSource implements DataSource { - private final MimeBodyPart part; - - /** - * Constructor, that constructs a DataSource from a MimeBodyPart. - */ - public MimePartDataSource(MimeBodyPart part) { - this.part = part; - } - - /** - * Returns an input stream from this MimeBodyPart. <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 ""; - } - } -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; -import com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; -import javax.activation.DataSource; -import javax.xml.soap.AttachmentPart; -import com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig; -import com.sun.xml.internal.org.jvnet.mimepull.MIMEMessage; -import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; - -/** - * - * @author Kumar - */ -public class MimePullMultipart extends MimeMultipart { - - private InputStream in = null; - private String boundary = null; - private MIMEMessage mm = null; - private DataSource dataSource = null; - private ContentType contType = null; - private String startParam = null; - private MIMEPart soapPart = null; - - public MimePullMultipart(DataSource ds, ContentType ct) - throws MessagingException { - parsed = false; - if (ct==null) - contType = new ContentType(ds.getContentType()); - else - contType = ct; - - dataSource = ds; - boundary = contType.getParameter("boundary"); - } - - public MIMEPart readAndReturnSOAPPart() throws MessagingException { - if (soapPart != null) { - throw new MessagingException("Inputstream from datasource was already consumed"); - } - readSOAPPart(); - return soapPart; - - } - - protected void readSOAPPart() throws MessagingException { - try { - if (soapPart != null) { - return; - } - in = dataSource.getInputStream(); - MIMEConfig config = new MIMEConfig(); //use defaults - mm = new MIMEMessage(in, boundary, config); - String st = contType.getParameter("start"); - if(startParam == null) { - soapPart = mm.getPart(0); - } else { - // Strip <...> from root part's Content-I - if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') { - st = st.substring(1, st.length()-1); - } - startParam = st; - soapPart = mm.getPart(startParam); - - } - } catch (IOException ex) { - throw new MessagingException("No inputstream from datasource", ex); - } - } - - public void parseAll() throws MessagingException { - if (parsed) { - return; - } - if (soapPart == null) { - readSOAPPart(); - } - - List<MIMEPart> prts = mm.getAttachments(); - for(MIMEPart part : prts) { - if (part != soapPart) { - new AttachmentPartImpl(part); - this.addBodyPart(new MimeBodyPart(part)); - } - } - parsed = true; - } - - protected void parse() throws MessagingException { - parseAll(); - } - -}
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java Mon Jan 12 11:46:43 2015 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1507 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please 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