站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档

SOAPPart (JBoss J2EE API) - JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档


javax.xml.soap
Class SOAPPart

java.lang.Object
  extended byjavax.xml.soap.SOAPPart
All Implemented Interfaces:
Document, Node

public abstract class SOAPPart
extends Object
implements Document

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.

Version:
$Revision: 1.2 $
Author:
Scott.Stark@jboss.org

Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
SOAPPart()
           
 
Method Summary
abstract  void addMimeHeader(String s, String s1)
           
abstract  Iterator getAllMimeHeaders()
           
abstract  Source getContent()
          Returns the content of the SOAPEnvelope as a JAXP Source object.
 String getContentId()
           
 String getContentLocation()
           
abstract  SOAPEnvelope getEnvelope()
           
abstract  Iterator getMatchingMimeHeaders(String[] as)
           
abstract  String[] getMimeHeader(String s)
           
abstract  Iterator getNonMatchingMimeHeaders(String[] as)
           
abstract  void removeAllMimeHeaders()
           
abstract  void removeMimeHeader(String s)
           
abstract  void setContent(Source source)
          Sets the content of the SOAPEnvelope object with the data from the given Source object.
 void setContentId(String contentId)
           
 void setContentLocation(String contentLocation)
           
abstract  void setMimeHeader(String s, String s1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Document
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, importNode
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Constructor Detail

SOAPPart

public SOAPPart()
Method Detail

getEnvelope

public abstract SOAPEnvelope getEnvelope()
                                  throws SOAPException
Throws:
SOAPException

getContentId

public String getContentId()

setContentId

public void setContentId(String contentId)

getContentLocation

public String getContentLocation()

setContentLocation

public void setContentLocation(String contentLocation)

removeMimeHeader

public abstract void removeMimeHeader(String s)

removeAllMimeHeaders

public abstract void removeAllMimeHeaders()

getMimeHeader

public abstract String[] getMimeHeader(String s)

setMimeHeader

public abstract void setMimeHeader(String s,
                                   String s1)

addMimeHeader

public abstract void addMimeHeader(String s,
                                   String s1)

getAllMimeHeaders

public abstract Iterator getAllMimeHeaders()

getMatchingMimeHeaders

public abstract Iterator getMatchingMimeHeaders(String[] as)

getNonMatchingMimeHeaders

public abstract Iterator getNonMatchingMimeHeaders(String[] as)

setContent

public abstract void setContent(Source source)
                         throws SOAPException
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 Source object with the data to be set
Throws:
SOAPException - if the implementation cannot convert the specified Source object

getContent

public abstract Source getContent()
                           throws SOAPException
Returns the content of the SOAPEnvelope as a JAXP Source object.

Returns:
the content as a javax.xml.transform.Source object
Throws:
SOAPException - if the implementation cannot convert the specified Source object
See Also:
setContent(javax.xml.transform.Source)


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.