Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to jakarta. Merged current metro-saaj into here #5

Open
wants to merge 2 commits into
base: jakarta-2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions saaj-ri/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,6 @@
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
16 changes: 8 additions & 8 deletions saaj-ri/src/test/java/mime/AttachImageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ public void testAddImageAndVerify() throws Exception {

// Save the soap message to file
FileOutputStream sentFile = new FileOutputStream(
"src/test/resources/mime/data/java_logo_sent.jpg");
"src/test/mime/data/java_logo_sent.jpg");
msg.writeTo(sentFile);
sentFile.close();

// See if we get the image object back
FileInputStream fin= new FileInputStream(
"src/test/resources/mime/data/java_logo_sent.jpg");
"src/test/mime/data/java_logo_sent.jpg");
SOAPMessage newMsg = mf.createMessage(msg.getMimeHeaders(), fin);

SOAPElement elment = newMsg.getSOAPBody();
Expand Down Expand Up @@ -293,13 +293,13 @@ public void testAddXmlAndVerify() throws Exception {

// Save the soap message to file
FileOutputStream sentFile = new FileOutputStream(
"src/test/resources/mime/data/saving.cnt");
"src/test/mime/data/saving.cnt");
msg.writeTo(sentFile);
sentFile.close();

// See if we get the attachment back
FileInputStream fin= new FileInputStream(
"src/test/resources/mime/data/saving.cnt");
"src/test/mime/data/saving.cnt");
SOAPMessage newMsg = mf.createMessage(msg.getMimeHeaders(), fin);
Iterator<AttachmentPart> i = newMsg.getAttachments();
while(i.hasNext()) {
Expand Down Expand Up @@ -338,13 +338,13 @@ public void testAddTextPlainAndVerify() throws Exception {

// Save the soap message to file
FileOutputStream sentFile = new FileOutputStream(
"src/test/resources/mime/data/saving_text.cnt");
"src/test/mime/data/saving_text.cnt");
msg.writeTo(sentFile);
sentFile.close();

// See if we get the attachment back
FileInputStream fin= new FileInputStream(
"src/test/resources/mime/data/saving_text.cnt");
"src/test/mime/data/saving_text.cnt");
SOAPMessage newMsg = mf.createMessage(msg.getMimeHeaders(), fin);
Iterator<AttachmentPart> i = newMsg.getAttachments();
while(i.hasNext()) {
Expand Down Expand Up @@ -623,13 +623,13 @@ public void testRemoveImageAndVerify() throws Exception {

// Save the soap message to file
FileOutputStream sentFile = new FileOutputStream(
"src/test/resources/mime/data/java_logo_sent.jpg");
"src/test/mime/data/java_logo_sent.jpg");
msg.writeTo(sentFile);
sentFile.close();

// See if we get the image object back
FileInputStream fin= new FileInputStream(
"src/test/resources/mime/data/java_logo_sent.jpg");
"src/test/mime/data/java_logo_sent.jpg");
SOAPMessage newMsg = mf.createMessage(msg.getMimeHeaders(), fin);
Iterator<AttachmentPart> i = newMsg.getAttachments();
//System.out.println("Count before remove:" + newMsg.countAttachments());
Expand Down
4 changes: 2 additions & 2 deletions saaj-ri/src/test/java/mime/AttachPngImageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ public void testAddPngImageAndVerify() throws Exception {

// Save the soap message to file
FileOutputStream sentFile = new FileOutputStream(
"src/test/resources/mime/data/image_sent.png");
"src/test/mime/data/image_sent.png");
msg.writeTo(sentFile);
sentFile.close();

// See if we get the image object back
FileInputStream fin= new FileInputStream(
"src/test/resources/mime/data/image_sent.png");
"src/test/mime/data/image_sent.png");
SOAPMessage newMsg = mf.createMessage(msg.getMimeHeaders(), fin);
Iterator<AttachmentPart> i = newMsg.getAttachments();
while(i.hasNext()) {
Expand Down
8 changes: 4 additions & 4 deletions saaj-ri/src/test/java/mime/StartParameterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ public void testStartParameter() throws Exception {
msg.saveChanges();

FileOutputStream sentFile =
new FileOutputStream("src/test/resources/mime/data/message.txt");
new FileOutputStream("src/test/mime/data/message.txt");
msg.writeTo(sentFile);
sentFile.close();
changeAndSaveMimeHeaders(msg, "src/test/resources/mime/data/headers.txt");
changeAndSaveMimeHeaders(msg, "src/test/mime/data/headers.txt");

SOAPMessage newMsg =
getModifiedMessage("src/test/resources/mime/data/headers.txt",
"src/test/resources/mime/data/message.txt");
getModifiedMessage("src/test/mime/data/headers.txt",
"src/test/mime/data/message.txt");
assertFalse("newMsg has an empty body",
newMsg.getSOAPBody().getChildElements().hasNext());
assertTrue("Soap part has the Content-Id: attachmentPart",
Expand Down