summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/binding-ws-axis2
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-12-17 18:39:51 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-12-17 18:39:51 +0000
commit23e97ff69eb46c26b378b30f9f2fae3c02c70947 (patch)
tree8ebd733d6b9b9672a241173badd9832996234ad3 /branches/sca-java-1.x/modules/binding-ws-axis2
parentd362d61718ef7c7d8d3f55d5fd74c7393fb37882 (diff)
Fix up the MTOM test case so it does something
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@727464 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-axis2')
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCase.java13
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java3
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite10
3 files changed, 15 insertions, 11 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCase.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCase.java
index e592134037..69b3b60ea7 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCase.java
@@ -30,10 +30,15 @@ public class FileTransferMTOMTestCase extends TestCase {
private SCADomain domain;
public void testFileTransfer() throws Exception {
- // For testing purpose lets try uploading FileTransferClient.java file.
- DataHandler dataHandler = new DataHandler(new FileDataSource("FileTransferClient.java"));
- FileTransferService filetransfer = domain.getService(FileTransferService.class, "FileTransferServiceComponent");
- assertEquals("File uploaded Sucessfully", filetransfer.uploadFile(dataHandler));
+ try {
+ // For testing purpose lets try uploading FileTransferClient.java file.
+ DataHandler dataHandler = new DataHandler(new FileDataSource("./LICENSE"));
+ FileTransferService filetransfer = domain.getService(FileTransferService.class, "FileTransferClientComponent");
+ //dataHandler.writeTo(System.out);
+ assertEquals("File uploaded Sucessfully", filetransfer.uploadFile(dataHandler));
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
}
@Override
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java
index 8d4a020560..51e31e9f95 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java
@@ -43,7 +43,8 @@ public class FileTransferServiceImpl implements FileTransferService {
fileOutputStream.flush();
fileOutputStream.close();*/
- System.out.println(attachment.getContentType());
+ System.out.println("Content type = " + attachment.getContentType() + "\nContent = ");
+ //attachment.writeTo(System.out);
return "File uploaded Sucessfully";
}
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite
index 03a16d9433..0edea98cf9 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite
@@ -26,17 +26,15 @@
<implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.mtom.FileTransferServiceImpl" />
<service name="FileTransferService">
<interface.wsdl interface="http://filetransfer#wsdl.interface(FileTransfer)" />
- <binding.ws uri="http://localhost:8085/FileTransferService"/>
+ <binding.ws uri="http://localhost:8085/FileTransferService" requires="MTOM"/>
</service>
</component>
<component name="FileTransferClientComponent">
<implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.mtom.FileTransferClient"/>
- <reference name="fileTransferWS" />
+ <reference name="fileTransferWS">
+ <binding.ws uri="http://localhost:8085/FileTransferService" requires="MTOM"/>
+ </reference>
</component>
- <reference name="fileTransferWS" promote="FileTransferClientComponent/fileTransferWS">
- <binding.ws uri="http://localhost:8085/FileTransferService"/>
- </reference>
-
</composite>