javax.xml.soap

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
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 Source Code / Java Documentation » 6.0 JDK Modules » saaj » javax.xml.soap 
javax.xml.soap
Provides the API for creating and building SOAP messages. This package is defined in the SOAP with Attachments API for JavaTM (SAAJ) 1.3 specification.

The API in the javax.xml.soap package allows you to do the following:

  • create a point-to-point connection to a specified endpoint
  • create a SOAP message
  • create an XML fragment
  • add content to the header of a SOAP message
  • add content to the body of a SOAP message
  • create attachment parts and add content to them
  • access/add/modify parts of a SOAP message
  • create/add/modify SOAP fault information
  • extract content from a SOAP message
  • send a SOAP request-response message

In addition the APIs in the javax.xml.soap package extend their counterparts in the org.w3c.dom package. This means that the SOAPPart of a SOAPMessage is also a DOM Level 2 Document, and can be manipulated as such by applications, tools and libraries that use DOM (see http://www.w3.org/DOM/ for more information). It is important to note that, while it is possible to use DOM APIs to add ordinary DOM nodes to a SAAJ tree, the SAAJ APIs are still required to return SAAJ types when examining or manipulating the tree. In order to accomplish this the SAAJ APIs (specifically {@link javax.xml.soap.SOAPElement#getChildElements()}) are allowed to silently replace objects that are incorrectly typed relative to SAAJ requirements with equivalent objects of the required type. These replacements must never cause the logical structure of the tree to change, so from the perspective of the DOM APIs the tree will remain unchanged. However, the physical composition of the tree will have changed so that references to the nodes that were replaced will refer to nodes that are no longer a part of the tree. The SAAJ APIs are not allowed to make these replacements if they are not required so the replacement objects will never subsequently be silently replaced by future calls to the SAAJ API.

What this means in practical terms is that an application that starts to use SAAJ APIs on a tree after manipulating it using DOM APIs must assume that the tree has been translated into an all SAAJ tree and that any references to objects within the tree that were obtained using DOM APIs are no longer valid. Switching from SAAJ APIs to DOM APIs is not allowed to cause invalid references and neither is using SAAJ APIs exclusively. It is only switching from using DOM APIs on a particular SAAJ tree to using SAAJ APIs that causes the risk of invalid references.

Java Source File NameTypeComment
AttachmentPart.javaClass A single attachment to a SOAPMessage object.
Detail.javaInterface A container for DetailEntry objects.
DetailEntry.javaInterface The content for a Detail object, giving details for a SOAPFault object.
FactoryFinder.javaClass
MessageFactory.javaClass A factory for creating SOAPMessage objects.

A SAAJ client can create a MessageFactory object using the method newInstance, as shown in the following lines of code.

 MessageFactory mf = MessageFactory.newInstance();
 MessageFactory mf12 = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
 

All MessageFactory objects, regardless of how they are created, will produce SOAPMessage objects that have the following elements by default:

  • A SOAPPart object
  • A SOAPEnvelope object
  • A SOAPBody object
  • A SOAPHeader object
In some cases, specialized MessageFactory objects may be obtained that produce messages prepopulated with additional entries in the SOAPHeader object and the SOAPBody object.
MimeHeader.javaClass An object that stores a MIME header name and its value.
MimeHeaders.javaClass A container for MimeHeader objects, which represent the MIME headers present in a MIME part of a message.

This class is used primarily when an application wants to retrieve specific attachments based on certain MIME headers and values.

Name.javaInterface A representation of an XML name.
Node.javaInterface A representation of a node (element) in an XML document.
SAAJMetaFactory.javaClass The access point for the implementation classes of the factories defined in the SAAJ API.
SAAJResult.javaClass Acts as a holder for the results of a JAXP transformation or a JAXB marshalling, in the form of a SAAJ tree.
SOAPBody.javaInterface An object that represents the contents of the SOAP body element in a SOAP message.
SOAPBodyElement.javaInterface A SOAPBodyElement object represents the contents in a SOAPBody object.
SOAPConnection.javaClass A point-to-point connection that a client can use for sending messages directly to a remote party (represented by a URL, for instance).

The SOAPConnection class is optional.

SOAPConnectionFactory.javaClass A factory for creating SOAPConnection objects.
SOAPConstants.javaInterface The definition of constants pertaining to the SOAP protocol.
SOAPElement.javaInterface An object representing an element of a SOAP message that is allowed but not specifically prescribed by a SOAP specification.
SOAPElementFactory.javaClass SOAPElementFactory is a factory for XML fragments that will eventually end up in the SOAP part.
SOAPEnvelope.javaInterface The container for the SOAPHeader and SOAPBody portions of a SOAPPart object.
SOAPException.javaClass An exception that signals that a SOAP exception has occurred.
SOAPFactory.javaClass SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree. SOAPFactory can be used to create XML fragments that will eventually end up in the SOAP part.
SOAPFault.javaInterface An element in the SOAPBody object that contains error and/or status information.
SOAPFaultElement.javaInterface A representation of the contents in a SOAPFault object.
SOAPHeader.javaInterface A representation of the SOAP header element.
SOAPHeaderElement.javaInterface An object representing the contents in the SOAP header part of the SOAP envelope.
SOAPMessage.javaClass The root class for all SOAP messages.
SOAPPart.javaClass The container for the SOAP-specific portion of a SOAPMessage object.
Text.javaInterface A representation of a node whose value is text.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.