You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2011/09/03 12:14:33 UTC
svn commit: r1164842 - in /webservices/commons/trunk/modules/axiom/modules:
axiom-api/src/main/java/org/apache/axiom/attachments/
axiom-api/src/test/java/org/apache/axiom/attachments/
axiom-api/src/test/java/org/apache/axiom/util/stax/xop/ axiom-integr...
Author: veithen
Date: Sat Sep 3 10:14:33 2011
New Revision: 1164842
URL: http://svn.apache.org/viewvc?rev=1164842&view=rev
Log:
Attachments is not only used for MTOM, but also for XOP. Avoid references to SOAP in the API.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentSet.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPEncodingStreamReaderTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/JAXBCustomBuilderTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/ImageSampleTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java
webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentSet.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentSet.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentSet.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentSet.java Sat Sep 3 10:14:33 2011
@@ -58,15 +58,15 @@ class AttachmentSet extends AttachmentsI
attachmentsMap.remove(blobContentID);
}
- InputStream getSOAPPartInputStream() throws OMException {
+ InputStream getRootPartInputStream() throws OMException {
throw new OMException("Invalid operation. Attachments are created programatically.");
}
- String getSOAPPartContentID() {
+ String getRootPartContentID() {
return null;
}
- String getSOAPPartContentType() {
+ String getRootPartContentType() {
throw new OMException(
"The attachments map was created programatically. Unsupported operation.");
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java Sat Sep 3 10:14:33 2011
@@ -203,15 +203,38 @@ public class Attachments implements OMAt
}
/**
- * @return the InputStream which includes the SOAP Envelope. It assumes that the root mime part
- * is always pointed by "start" parameter in content-type.
+ * @deprecated Use {@link #getRootPartInputStream()} instead.
*/
public InputStream getSOAPPartInputStream() throws OMException {
- return impl.getSOAPPartInputStream();
+ return getRootPartInputStream();
+ }
+
+ /**
+ * @deprecated Use {@link #getRootPartContentID()} instead.
+ */
+ public String getSOAPPartContentID() {
+ return getRootPartContentID();
+ }
+
+ /**
+ * @deprecated Use {@link #getRootPartContentType()} instead.
+ */
+ public String getSOAPPartContentType() {
+ return getRootPartContentType();
+ }
+
+ /**
+ * Get an input stream for the root part of the MIME message. The root part is located as
+ * described in the documentation of the {@link #getRootPartContentID()} method.
+ *
+ * @return the input stream for the root part
+ */
+ public InputStream getRootPartInputStream() throws OMException {
+ return impl.getRootPartInputStream();
}
/**
- * Get the content ID of the SOAP part or the MIME message. This content ID is determined as
+ * Get the content ID of the root part of the MIME message. This content ID is determined as
* follows:
* <ul>
* <li>If the content type of the MIME message has a <tt>start</tt> parameter, then the content
@@ -219,21 +242,22 @@ public class Attachments implements OMAt
* <li>Otherwise the content ID of the first MIME part of the MIME message is returned.
* </ul>
*
- * @return the content ID of the SOAP part (without the surrounding angle brackets)
+ * @return the content ID of the root part (without the surrounding angle brackets)
*/
- public String getSOAPPartContentID() {
- return impl.getSOAPPartContentID();
+ public String getRootPartContentID() {
+ return impl.getRootPartContentID();
}
/**
- * Get the content type of the SOAP part of the MIME message.
+ * Get the content type of the root part of the MIME message. The root part is located as
+ * described in the documentation of the {@link #getRootPartContentID()} method.
*
- * @return the content type of the SOAP part
+ * @return the content type of the root part
* @throws OMException
* if the content type could not be determined
*/
- public String getSOAPPartContentType() {
- return impl.getSOAPPartContentType();
+ public String getRootPartContentType() {
+ return impl.getRootPartContentType();
}
/**
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsImpl.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsImpl.java Sat Sep 3 10:14:33 2011
@@ -36,9 +36,9 @@ abstract class AttachmentsImpl {
abstract DataHandler getDataHandler(String contentID);
abstract void addDataHandler(String contentID, DataHandler dataHandler);
abstract void removeDataHandler(String blobContentID);
- abstract InputStream getSOAPPartInputStream() throws OMException;
- abstract String getSOAPPartContentID();
- abstract String getSOAPPartContentType();
+ abstract InputStream getRootPartInputStream() throws OMException;
+ abstract String getRootPartContentID();
+ abstract String getRootPartContentType();
abstract IncomingAttachmentStreams getIncomingAttachmentStreams();
abstract Set getContentIDs(boolean fetchAll);
abstract Map getMap();
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java Sat Sep 3 10:14:33 2011
@@ -136,7 +136,7 @@ class MIMEMessage extends AttachmentsImp
}
// Read the SOAP part and cache it
- getDataHandler(getSOAPPartContentID());
+ getDataHandler(getRootPartContentID());
// Now reset partsRequested. SOAP part is a special case which is always
// read beforehand, regardless of request.
@@ -180,10 +180,10 @@ class MIMEMessage extends AttachmentsImp
} while (getNextPartDataHandler() != null);
}
- InputStream getSOAPPartInputStream() throws OMException {
+ InputStream getRootPartInputStream() throws OMException {
DataHandler dh;
try {
- dh = getDataHandler(getSOAPPartContentID());
+ dh = getDataHandler(getRootPartContentID());
if (dh == null) {
throw new OMException(
"Mandatory Root MIME part containing the SOAP Envelope is missing");
@@ -195,7 +195,7 @@ class MIMEMessage extends AttachmentsImp
}
}
- String getSOAPPartContentID() {
+ String getRootPartContentID() {
String rootContentID = contentType.getParameter("start");
if (log.isDebugEnabled()) {
log.debug("getSOAPPartContentID rootContentID=" + rootContentID);
@@ -224,8 +224,8 @@ class MIMEMessage extends AttachmentsImp
return rootContentID;
}
- String getSOAPPartContentType() {
- String soapPartContentID = getSOAPPartContentID();
+ String getRootPartContentType() {
+ String soapPartContentID = getRootPartContentID();
if (soapPartContentID == null) {
throw new OMException("Unable to determine the content ID of the SOAP part");
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java Sat Sep 3 10:14:33 2011
@@ -155,7 +155,7 @@ public class AttachmentsTest extends Abs
assertEquals(-1, attachments.getContentLength());
}
- private void testGetSOAPPartContentID(String contentTypeStartParam, String contentId)
+ private void testGetRootPartContentID(String contentTypeStartParam, String contentId)
throws Exception {
// It doesn't actually matter what the stream *is* it just needs to exist
String contentType = "multipart/related; boundary=\"" + TestConstants.MTOM_MESSAGE_BOUNDARY +
@@ -163,50 +163,50 @@ public class AttachmentsTest extends Abs
InputStream inStream = getTestResource(TestConstants.MTOM_MESSAGE);
Attachments attachments = new Attachments(inStream, contentType);
assertEquals("Did not obtain correct content ID", contentId,
- attachments.getSOAPPartContentID());
+ attachments.getRootPartContentID());
}
- public void testGetSOAPPartContentIDWithoutBrackets() throws Exception {
- testGetSOAPPartContentID("my-content-id@localhost", "my-content-id@localhost");
+ public void testGetRootPartContentIDWithoutBrackets() throws Exception {
+ testGetRootPartContentID("my-content-id@localhost", "my-content-id@localhost");
}
- public void testGetSOAPPartContentIDWithBrackets() throws Exception {
- testGetSOAPPartContentID("<my...@localhost>", "my-content-id@localhost");
+ public void testGetRootPartContentIDWithBrackets() throws Exception {
+ testGetRootPartContentID("<my...@localhost>", "my-content-id@localhost");
}
// Not sure when exactly somebody uses the "cid:" prefix in the start parameter, but
// this is how the code currently works.
- public void testGetSOAPPartContentIDWithCidPrefix() throws Exception {
- testGetSOAPPartContentID("cid:my-content-id@localhost", "my-content-id@localhost");
+ public void testGetRootPartContentIDWithCidPrefix() throws Exception {
+ testGetRootPartContentID("cid:my-content-id@localhost", "my-content-id@localhost");
}
// Regression test for WSCOMMONS-329
- public void testGetSOAPPartContentIDWithCidPrefix2() throws Exception {
- testGetSOAPPartContentID("<ci...@192.168.0.1>", "cid-73920@192.168.0.1");
+ public void testGetRootPartContentIDWithCidPrefix2() throws Exception {
+ testGetRootPartContentID("<ci...@192.168.0.1>", "cid-73920@192.168.0.1");
}
- public void testGetSOAPPartContentIDShort() throws Exception {
- testGetSOAPPartContentID("bbb", "bbb");
+ public void testGetRootPartContentIDShort() throws Exception {
+ testGetRootPartContentID("bbb", "bbb");
}
- public void testGetSOAPPartContentIDShortWithBrackets() throws Exception {
- testGetSOAPPartContentID("<b>", "b");
+ public void testGetRootPartContentIDShortWithBrackets() throws Exception {
+ testGetRootPartContentID("<b>", "b");
}
- public void testGetSOAPPartContentIDBorderline() throws Exception {
- testGetSOAPPartContentID("cid:", "cid:");
+ public void testGetRootPartContentIDBorderline() throws Exception {
+ testGetRootPartContentID("cid:", "cid:");
}
/**
- * Tests that {@link Attachments#getSOAPPartContentType()} throws a meaningful exception if it
+ * Tests that {@link Attachments#getRootPartContentType()} throws a meaningful exception if it
* is unable to determine the content type.
*/
- public void testGetSOAPPartContentTypeWithContentIDMismatch() {
+ public void testGetRootPartContentTypeWithContentIDMismatch() {
String contentType = "multipart/related; boundary=\"" + TestConstants.MTOM_MESSAGE_BOUNDARY +
"\"; type=\"text/xml\"; start=\"<wr...@example.org>\"";
Attachments attachments = new Attachments(getTestResource(TestConstants.MTOM_MESSAGE), contentType);
try {
- attachments.getSOAPPartContentType();
+ attachments.getRootPartContentType();
fail("Expected OMException");
} catch (OMException ex) {
// OK, expected
@@ -258,7 +258,7 @@ public class AttachmentsTest extends Abs
// Since SOAP part operated independently of other streams, access it
// directly, and then get to the streams. If this sequence throws an
// error, something is wrong with the stream handling code.
- InputStream is = attachments.getSOAPPartInputStream();
+ InputStream is = attachments.getRootPartInputStream();
while (is.read() != -1) ;
// Get the inputstream container
@@ -277,7 +277,7 @@ public class AttachmentsTest extends Abs
// After all is done, we should *still* be able to access and
// re-consume the SOAP part stream, as it should be cached.. can we?
- is = attachments.getSOAPPartInputStream();
+ is = attachments.getRootPartInputStream();
while (is.read() != -1) ;
}
@@ -308,7 +308,7 @@ public class AttachmentsTest extends Abs
// These should NOT throw error even though they are using part based access
try {
- String contentType = attachments.getSOAPPartContentType();
+ String contentType = attachments.getRootPartContentType();
assertTrue(contentType.indexOf("application/xop+xml;") >=0);
assertTrue(contentType.indexOf("charset=UTF-8;") >=0);
assertTrue(contentType.indexOf("type=\"application/soap+xml\";") >=0);
@@ -318,7 +318,7 @@ public class AttachmentsTest extends Abs
}
try {
- attachments.getSOAPPartInputStream();
+ attachments.getRootPartInputStream();
} catch (IllegalStateException ise) {
fail("No exception expected when requesting SOAP part data");
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java Sat Sep 3 10:14:33 2011
@@ -37,7 +37,7 @@ public class XOPDecodingStreamReaderTest
Attachments attachments = new Attachments(getTestResource(TestConstants.MTOM_MESSAGE),
TestConstants.MTOM_MESSAGE_CONTENT_TYPE);
return new XOPDecodingStreamReader(
- StAXUtils.createXMLStreamReader(attachments.getSOAPPartInputStream()),
+ StAXUtils.createXMLStreamReader(attachments.getRootPartInputStream()),
new OMAttachmentAccessorMimePartProvider(attachments));
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPEncodingStreamReaderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPEncodingStreamReaderTest.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPEncodingStreamReaderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPEncodingStreamReaderTest.java Sat Sep 3 10:14:33 2011
@@ -44,7 +44,7 @@ public class XOPEncodingStreamReaderTest
for (int i=0; i<2; i++) {
attachments[i] = new Attachments(getTestResource(TestConstants.MTOM_MESSAGE),
TestConstants.MTOM_MESSAGE_CONTENT_TYPE);
- soapPartReader[i] = StAXUtils.createXMLStreamReader(attachments[i].getSOAPPartInputStream());
+ soapPartReader[i] = StAXUtils.createXMLStreamReader(attachments[i].getRootPartInputStream());
}
XMLStreamReader actual = new XOPEncodingStreamReader(new XOPDecodingStreamReader(soapPartReader[1], new OMAttachmentAccessorMimePartProvider(attachments[1])), contentIDGenerator, OptimizationPolicy.DEFAULT);
new XMLStreamReaderComparator(soapPartReader[0], actual).compare();
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/JAXBCustomBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/JAXBCustomBuilderTest.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/JAXBCustomBuilderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/JAXBCustomBuilderTest.java Sat Sep 3 10:14:33 2011
@@ -105,6 +105,6 @@ public class JAXBCustomBuilderTest {
createTestDocument(dh).serialize(out, format);
out.close();
Attachments attachments = new Attachments(blob.getInputStream(), format.getContentType());
- test(dh, new XOPAwareStAXOMBuilder(attachments.getSOAPPartInputStream(), attachments), false, true, true);
+ test(dh, new XOPAwareStAXOMBuilder(attachments.getRootPartInputStream(), attachments), false, true, true);
}
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java Sat Sep 3 10:14:33 2011
@@ -57,7 +57,7 @@ public class AttachmentsTest extends Abs
InputStream inStream = getTestResource(TestConstants.MTOM_MESSAGE);
Attachments attachments = new Attachments(inStream, TestConstants.MTOM_MESSAGE_CONTENT_TYPE);
- attachments.getSOAPPartInputStream();
+ attachments.getRootPartInputStream();
String[] contentIDs = attachments.getAllContentIDs();
@@ -71,7 +71,7 @@ public class AttachmentsTest extends Abs
MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(baos, oof);
XOPAwareStAXOMBuilder builder =
- new XOPAwareStAXOMBuilder(attachments.getSOAPPartInputStream(),
+ new XOPAwareStAXOMBuilder(attachments.getRootPartInputStream(),
attachments);
OMElement om = builder.getDocumentElement();
om.serialize(writer);
@@ -87,7 +87,7 @@ public class AttachmentsTest extends Abs
Boolean.TRUE);
writer = new MTOMXMLStreamWriter(baos, oof);
builder =
- new XOPAwareStAXOMBuilder(attachments.getSOAPPartInputStream(),
+ new XOPAwareStAXOMBuilder(attachments.getRootPartInputStream(),
attachments);
om = builder.getDocumentElement();
om.serialize(writer);
@@ -110,7 +110,7 @@ public class AttachmentsTest extends Abs
Boolean.FALSE);
writer = new MTOMXMLStreamWriter(baos, oof);
builder =
- new XOPAwareStAXOMBuilder(attachments2.getSOAPPartInputStream(),
+ new XOPAwareStAXOMBuilder(attachments2.getRootPartInputStream(),
attachments2);
om = builder.getDocumentElement();
om.serialize(writer);
@@ -126,7 +126,7 @@ public class AttachmentsTest extends Abs
Boolean.TRUE);
writer = new MTOMXMLStreamWriter(baos, oof);
builder =
- new XOPAwareStAXOMBuilder(attachments2.getSOAPPartInputStream(),
+ new XOPAwareStAXOMBuilder(attachments2.getRootPartInputStream(),
attachments2);
om = builder.getDocumentElement();
om.serialize(writer);
@@ -150,7 +150,7 @@ public class AttachmentsTest extends Abs
// Get the root
XMLStreamReader reader =
- StAXUtils.createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments.getSOAPPartInputStream())));
+ StAXUtils.createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments.getRootPartInputStream())));
MTOMStAXSOAPModelBuilder builder =
new MTOMStAXSOAPModelBuilder(reader, attachments, null);
OMElement root = builder.getDocumentElement();
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/ImageSampleTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/ImageSampleTest.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/ImageSampleTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/ImageSampleTest.java Sat Sep 3 10:14:33 2011
@@ -114,7 +114,7 @@ public class ImageSampleTest extends Abs
InputStream inStream = getTestResource(inMimeFileName);
Attachments attachments = new Attachments(inStream, contentTypeString);
XMLStreamReader reader = StAXUtils.createXMLStreamReader(new BufferedReader(
- new InputStreamReader(attachments.getSOAPPartInputStream())));
+ new InputStreamReader(attachments.getRootPartInputStream())));
builder = new MTOMStAXSOAPModelBuilder(reader, attachments, null);
OMElement root = builder.getDocumentElement();
OMElement body = (OMElement) root.getFirstOMChild();
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java Sat Sep 3 10:14:33 2011
@@ -72,7 +72,7 @@ public class MTOMStAXSOAPModelBuilderTes
InputStream inStream = getTestResource(inFileName);
Attachments attachments = new Attachments(inStream, contentTypeString);
XMLStreamReader reader = StAXUtils.createXMLStreamReader(new BufferedReader(
- new InputStreamReader(attachments.getSOAPPartInputStream())));
+ new InputStreamReader(attachments.getRootPartInputStream())));
return new MTOMStAXSOAPModelBuilder(reader, attachments,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
}
@@ -297,7 +297,7 @@ public class MTOMStAXSOAPModelBuilderTes
InputStream inStream = new BufferedInputStream(new ByteArrayInputStream(full));
Attachments attachments = new Attachments(inStream, contentTypeString);
XMLStreamReader reader = StAXUtils.createXMLStreamReader(
- attachments.getSOAPPartInputStream(), "UTF-16");
+ attachments.getRootPartInputStream(), "UTF-16");
MTOMStAXSOAPModelBuilder builder = new MTOMStAXSOAPModelBuilder(reader, attachments,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
OMElement root = builder.getDocumentElement();
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java Sat Sep 3 10:14:33 2011
@@ -45,7 +45,7 @@ public class TestBuildWithAttachments ex
InputStream in = AbstractTestCase.getTestResource(TestConstants.MTOM_MESSAGE);
Attachments attachments = new Attachments(in, TestConstants.MTOM_MESSAGE_CONTENT_TYPE);
SOAPEnvelope envelope = new MTOMStAXSOAPModelBuilder(
- StAXUtils.createXMLStreamReader(attachments.getSOAPPartInputStream()),
+ StAXUtils.createXMLStreamReader(attachments.getRootPartInputStream()),
metaFactory.getSOAP12Factory(), attachments,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI).getSOAPEnvelope();
envelope.buildWithAttachments();
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java?rev=1164842&r1=1164841&r2=1164842&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java Sat Sep 3 10:14:33 2011
@@ -105,7 +105,7 @@ public class TestMTOMForwardStreaming ex
try {
Attachments attachments = new Attachments(pipe1In, contentType);
SOAPEnvelope envelope = new MTOMStAXSOAPModelBuilder(
- StAXUtils.createXMLStreamReader(attachments.getSOAPPartInputStream()),
+ StAXUtils.createXMLStreamReader(attachments.getRootPartInputStream()),
metaFactory.getSOAP12Factory(), attachments,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI).getSOAPEnvelope();
// The code path executed by serializeAndConsume is significantly different if
@@ -128,7 +128,7 @@ public class TestMTOMForwardStreaming ex
try {
Attachments attachments = new Attachments(pipe2In, contentType);
SOAPEnvelope envelope = new MTOMStAXSOAPModelBuilder(
- StAXUtils.createXMLStreamReader(attachments.getSOAPPartInputStream()),
+ StAXUtils.createXMLStreamReader(attachments.getRootPartInputStream()),
metaFactory.getSOAP12Factory(), attachments,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI).getSOAPEnvelope();
OMElement bodyElement = envelope.getBody().getFirstElement();