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. Class
8. Collections Data Structure
9. Data Type
10. Database SQL JDBC
11. Design Pattern
12. Development Class
13. EJB3
14. Email
15. Event
16. File Input Output
17. Game
18. Generics
19. GWT
20. Hibernate
21. I18N
22. J2EE
23. J2ME
24. JDK 6
25. JNDI LDAP
26. JPA
27. JSP
28. JSTL
29. Language Basics
30. Network Protocol
31. PDF RTF
32. Reflection
33. Regular Expressions
34. Scripting
35. Security
36. Servlets
37. Spring
38. Swing Components
39. Swing JFC
40. SWT JFace Eclipse
41. Threads
42. Tiny Application
43. Velocity
44. Web Services SOA
45. XML
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 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
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.