Java Doc for SOAPPart.java in  » 6.0-JDK-Core » xml » javax » xml » soap » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.soap 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

SOAPPart
abstract public class SOAPPart implements org.w3c.dom.Document,Node(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.





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 theMIME headers not to be returned all of the MIME headers in this SOAPPart objectexcept those that match one of the names in thegiven 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.



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 setor added
exception:
  IllegalArgumentException - if there was a problem withthe 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 Mimeheaders for this SOAPPart 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
exception:
  SOAPException - if the implementation cannot convertthe specified Source object
See Also:   SOAPPart.setContent



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 headernamed "Content-Id"
See Also:   SOAPPart.setContentId



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 whosename is "Content-Location"
See Also:   SOAPPart.setContentLocation



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 thisSOAPPart object
exception:
  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 theMIME headers to be returned all of the MIME headers that match one of the names in thegiven array, returned as an 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 thespecified header
See Also:   SOAPPart.setMimeHeader



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 theMIME headers not to be returned all of the MIME headers in this SOAPPart objectexcept those that match one of the names in thegiven 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) tobe 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. This Source must contain a valid SOAP document.
Parameters:
  source - the javax.xml.transform.Source object with thedata to be set
exception:
  SOAPException - if there is a problem in setting the source
See Also:   SOAPPart.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 MIMEheader "Content-Id"
exception:
  IllegalArgumentException - if there is a problem insetting the content id
See Also:   SOAPPart.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 valueof the MIMEheader "Content-Location"
exception:
  IllegalArgumentException - if there is a problem insetting the content location.
See Also:   SOAPPart.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 namefor which to search
Parameters:
  value - a String giving the value to be set.This value will be substituted for the current value(s)of the first header that is a match if there is one.If there is no match, this value will be the value fora new MimeHeader object.
exception:
  IllegalArgumentException - if there was a problem withthe specified mime header name or value
See Also:   SOAPPart.getMimeHeader




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.