Demonstrates the capabilities and power of SOAP with Attachment support and the Attachment API of AXIS2 : SOAP « Web Services SOA « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Collections Data Structure
8. Database SQL JDBC
9. Design Pattern
10. Development Class
11. Email
12. Event
13. File Input Output
14. Game
15. Hibernate
16. J2EE
17. J2ME
18. JDK 6
19. JSP
20. JSTL
21. Language Basics
22. Network Protocol
23. PDF RTF
24. Regular Expressions
25. Security
26. Servlets
27. Spring
28. Swing Components
29. Swing JFC
30. SWT JFace Eclipse
31. Threads
32. Tiny Application
33. Velocity
34. Web Services SOA
35. XML
Microsoft Office Word 2007 Tutorial
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java » Web Services SOA » SOAPScreenshots 
Demonstrates the capabilities and power of SOAP with Attachment support and the Attachment API of AXIS2
 

Sample: SOAP with Attachments
================================

Introduction
============
This sample demonstrates the capabilities and power of SOAP with Attachment support and the
Attachment API of AXIS2. More information about Axis2 attachment implementation can be found at 
http://ws.apache.org/axis2/1_1/mtom-guide.html. 

This sample includes a service and a client which can be used to upload a file to the server using 
SOAP message containing a SOAP with Attachment type binary attachment. The service is written and 
deployed using the RCPMessageReceiver and a POJO(Plain Old Java Object). The POJO service class uses 
the Attachment API of the MessageContext to retrieve the received attachment.The client program is 
written using the OperationClient API of Axis2 together with the Attachment API of MessageContext.


Objectives
==========

 * Writing a POJO (Plain Old Java Objectbased service to access attachments.
 * Implement a Axis2 OperationClient based Web Service client to invoke the service with SOAP 
   with Attachment type attachments.
 * Invoke the deployed service.

Prerequisites
=============
Install Apache Ant 1.6.2 or later


Running the Sample:
===================
The files belonging to this sample are contained in the samples/soapwithattachments folder of the 
extracted Axis2 binary distribution, which will be called here after as SWA_SAMPLE_DIR. The 
location of the extracted binary distribution will be refered as AXIS2_DIST. There is a 
"build.xml" Ant script in the SWA_SAMPLE_DIR that contains build targets for building the service 
archive and running the client application - all described in steps below. 

1. Generate the service
Use "ant generate.service" command in the SWA_SAMPLE_DIR to build the service. Generated service 
will automatically gets copied in to the AXIS2_DIST/repository/services directory. Source file 
ralating to this service can be found at 
SWA_SAMPLE_DIR/src/sample/soapwithattachments/service/AttachmentService.java. The services.xml used
when building this service can be found at SWA_SAMPLE_DIR/resources directory. 

2. Deploy the service
Run the AXIS2_DIST/bin/axis2server.{sh.batscript to start the standalone axis2 server. This server 
will deploy all the srvices available at AXIS2_DIST/repository/services directory. Alternatively you
can drop the sample-swa.aar service archive to the services directory of a running Axis2 servlet)

3. Running the client
Use "ant run.client -Dfile <file to be send> -Ddest <destination file name>" command in the 
SWA_SAMPLE_DIR to build and run the client. Source file ralating to the client can be found at 
SWA_SAMPLE_DIR/src/sample/soapwithattachments/client/SWAClient.java.

Help
====
Please contact axis-user list (axis-user@ws.apache.orgif you have any trouble running the sample.


        
AXIS2-soapwithattachments.zip( 8 k)
Related examples in the same category
1. JAX-WS: SOAP Element Any Type
2. JAX-WS: SOAP Element
3. A SOAP message with an attachment and XML-binary Optimized Packaging
4. Hello World SOAP12 Demo using Document/Literal Style: the use of Apache CXF's SOAP 1.2 capabilities
5. This demo illustrates Apache CXF's support for SOAP headers
w_w_w_.__j__av__a___2___s.__c___om_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.