Java Doc for SOAPPart.java in  » Web-Services-AXIS2 » saaj » javax » xml » soap » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 » Web Services AXIS2 » saaj » javax.xml.soap 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.xml.soap.SOAPPart

All known Subclasses:   org.apache.axis2.saaj.SOAPPartImpl,
SOAPPart
abstract public class SOAPPart implements javax.xml.soap.Node,org.w3c.dom.Document(Code)

The container for the SOAP-specific portion of a SOAPMessage object. All messages are required to have a SOAP part, so when a SOAPMessage object is created, it will automatically have a SOAPPart object.

A SOAPPart object is a MIME part and has the MIME headers Content-Id, Content-Location, and Content-Type. Because the value of Content-Type must be "text/xml", a SOAPPart object automatically has a MIME header of Content-Type with its value set to "text/xml". The value must be "text/xml" because content in the SOAP part of a message must be in XML format. Content that is not of type "text/xml" must be in an AttachmentPart object rather than in the SOAPPart object.

When a message is sent, its SOAP part must have the MIME header Content-Type set to "text/xml". Or, from the other perspective, the SOAP part of any message that is received must have the MIME header Content-Type with a value of "text/xml".

A client can access the SOAPPart object of a SOAPMessage object by calling the method SOAPMessage.getSOAPPart. The following line of code, in which message is a SOAPMessage object, retrieves the SOAP part of a message.

 SOAPPart soapPart = message.getSOAPPart(); 

A SOAPPart object contains a SOAPEnvelope object, which in turn contains a SOAPBody object and a SOAPHeader object. The SOAPPart method getEnvelope can be used to retrieve the SOAPEnvelope object.




Constructor Summary
public  SOAPPart()
    

Method Summary
abstract public  voidaddMimeHeader(String name, String value)
     Creates a MimeHeader object with the specified name and value and adds it to this SOAPPart object.
abstract public  IteratorgetAllMimeHeaders()
     Retrieves all the headers for this SOAPPart object as an iterator over the MimeHeader objects.
abstract public  SourcegetContent()
     Returns the content of the SOAPEnvelope as a JAXP Source object.
public  StringgetContentId()
     Retrieves the value of the MIME header whose name is "Content-Id".
public  StringgetContentLocation()
     Retrieves the value of the MIME header whose name is "Content-Location".
abstract public  SOAPEnvelopegetEnvelope()
     Gets the SOAPEnvelope object associated with this SOAPPart object.
abstract public  IteratorgetMatchingMimeHeaders(String names)
     Retrieves all MimeHeader objects that match a name in the given array.
abstract public  String[]getMimeHeader(String name)
     Gets all the values of the MimeHeader object in this SOAPPart object that is identified by the given String.
abstract public  IteratorgetNonMatchingMimeHeaders(String names)
     Retrieves all MimeHeader objects whose name does not match a name in the given array.
Parameters:
  names - a String array with the name(s) of the MIME headers not to bereturned all of the MIME headers in this SOAPPart object except those that matchone of the names in the given array.
abstract public  voidremoveAllMimeHeaders()
     Removes all the MimeHeader objects for this SOAPEnvelope object.
abstract public  voidremoveMimeHeader(String header)
     Removes all MIME headers that match the given name.
abstract public  voidsetContent(Source source)
     Sets the content of the SOAPEnvelope object with the data from the given Source object.
public  voidsetContentId(String contentId)
     Sets the value of the MIME header named "Content-Id" to the given String.
public  voidsetContentLocation(String contentLocation)
     Sets the value of the MIME header "Content-Location" to the given String.
abstract public  voidsetMimeHeader(String name, String value)
     Changes the first header entry that matches the given header name so that its value is the given value, adding a new header with the given name and value if no existing header is a match.


Constructor Detail
SOAPPart
public SOAPPart()(Code)




Method Detail
addMimeHeader
abstract public void addMimeHeader(String name, String value)(Code)
Creates a MimeHeader object with the specified name and value and adds it to this SOAPPart object. If a MimeHeader with the specified name already exists, this method adds the specified value to the already existing value(s).

Note that RFC822 headers can contain only US-ASCII characters.


Parameters:
  name - a String giving the header name
Parameters:
  value - a String giving the value to be set or added
throws:
  IllegalArgumentException - if there was a problem with the specified mime header name or value



getAllMimeHeaders
abstract public Iterator getAllMimeHeaders()(Code)
Retrieves all the headers for this SOAPPart object as an iterator over the MimeHeader objects. an Iterator object with all of the Mime headers for thisSOAPPart object



getContent
abstract public Source getContent() throws SOAPException(Code)
Returns the content of the SOAPEnvelope as a JAXP Source object. the content as a javax.xml.transform.Source object
throws:
  SOAPException - if the implementation cannot convert the specified Sourceobject
See Also:   SOAPPart.setContent(javax.xml.transform.Source)
See Also:    setContent(javax.xml.transform.Source)



getContentId
public String getContentId()(Code)
Retrieves the value of the MIME header whose name is "Content-Id". a String giving the value of the MIME header named "Content-Id"
See Also:   SOAPPart.setContentId(String)
See Also:    setContentId(java.lang.String)



getContentLocation
public String getContentLocation()(Code)
Retrieves the value of the MIME header whose name is "Content-Location". a String giving the value of the MIME header whose name is"Content-Location"
See Also:   SOAPPart.setContentLocation(String)
See Also:    setContentLocation(java.lang.String)



getEnvelope
abstract public SOAPEnvelope getEnvelope() throws SOAPException(Code)
Gets the SOAPEnvelope object associated with this SOAPPart object. Once the SOAP envelope is obtained, it can be used to get its contents. the SOAPEnvelope object for this SOAPPart object
throws:
  SOAPException - if there is a SOAP error



getMatchingMimeHeaders
abstract public Iterator getMatchingMimeHeaders(String names)(Code)
Retrieves all MimeHeader objects that match a name in the given array.
Parameters:
  names - a String array with the name(s) of the MIME headers to be returned all of the MIME headers that match one of the names in the given array, returned asan Iterator object



getMimeHeader
abstract public String[] getMimeHeader(String name)(Code)
Gets all the values of the MimeHeader object in this SOAPPart object that is identified by the given String.
Parameters:
  name - the name of the header; example: "Content-Type" a String array giving all the values for the specified header
See Also:   SOAPPart.setMimeHeader(String,String)
See Also:    setMimeHeader(java.lang.String,
See Also:   java.lang.String)



getNonMatchingMimeHeaders
abstract public Iterator getNonMatchingMimeHeaders(String names)(Code)
Retrieves all MimeHeader objects whose name does not match a name in the given array.
Parameters:
  names - a String array with the name(s) of the MIME headers not to bereturned all of the MIME headers in this SOAPPart object except those that matchone of the names in the given array. The nonmatching MIME headers are returned as anIterator object.



removeAllMimeHeaders
abstract public void removeAllMimeHeaders()(Code)
Removes all the MimeHeader objects for this SOAPEnvelope object.



removeMimeHeader
abstract public void removeMimeHeader(String header)(Code)
Removes all MIME headers that match the given name.
Parameters:
  header - a String giving the name of the MIME header(s) to be removed



setContent
abstract public void setContent(Source source) throws SOAPException(Code)
Sets the content of the SOAPEnvelope object with the data from the given Source object.
Parameters:
  source - javax.xml.transform.Source object with the data to be set
throws:
  SOAPException - if there is a problem in setting the source
See Also:   SOAPPart.getContent()
See Also:    getContent()



setContentId
public void setContentId(String contentId)(Code)
Sets the value of the MIME header named "Content-Id" to the given String.
Parameters:
  contentId - a String giving the value of the MIME header "Content-Id"
throws:
  IllegalArgumentException - if there is a problem in setting the content id
See Also:   SOAPPart.getContentId()
See Also:    getContentId()



setContentLocation
public void setContentLocation(String contentLocation)(Code)
Sets the value of the MIME header "Content-Location" to the given String.
Parameters:
  contentLocation - a String giving the value of the MIME header"Content-Location"
throws:
  IllegalArgumentException - if there is a problem in setting the content location.
See Also:   SOAPPart.getContentLocation()
See Also:    getContentLocation()



setMimeHeader
abstract public void setMimeHeader(String name, String value)(Code)
Changes the first header entry that matches the given header name so that its value is the given value, adding a new header with the given name and value if no existing header is a match. If there is a match, this method clears all existing values for the first header that matches and sets the given value instead. If more than one header has the given name, this method removes all of the matching headers after the first one.

Note that RFC822 headers can contain only US-ASCII characters.


Parameters:
  name - a String giving the header name for which to search
Parameters:
  value - a String giving the value to be set. This value will be substitutedfor the current value(s) of the first header that is a match if there is one. Ifthere is no match, this value will be the value for a newMimeHeader object.
throws:
  IllegalArgumentException - if there was a problem with the specified mime header name or value
throws:
  IllegalArgumentException - if there was a problem with the specified mime header name or value
See Also:   SOAPPart.getMimeHeader(String)
See Also:    getMimeHeader(java.lang.String)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.