|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.soap.rpc.SOAPContext
SOAP context for a message. Encapsulates:
Field Summary |
Type | Field |
---|---|
protected java.util.Hashtable |
bag
|
protected java.lang.ClassLoader |
loader
|
protected javax.mail.internet.MimeMultipart |
parts
|
protected boolean |
rootPartSet
This flag indicates if setRootPart() was called, so we can distinguish default root part resolution from deliberate root part indication. |
Constructor Summary | |
SOAPContext()
Constructor. |
Method Summary |
Type | Method |
---|---|
void |
addBodyPart(javax.mail.internet.MimeBodyPart part)
Adds a Part. |
void |
addBodyPart(javax.mail.internet.MimeBodyPart part,
int index)
Adds a MimeBodyPart at position index . |
javax.mail.internet.MimeBodyPart |
findBodyPart(java.lang.String uri)
Find the Mimepart referred to by the given URI. |
javax.mail.internet.MimeBodyPart |
findPartByLocation(java.lang.String uri)
Find the Mimepart referred to by the given URI. |
java.lang.String |
getBaseURI()
Determine the document's base URI, according to the following scheme: The Content-Location header of the root (SOAP) part. |
javax.mail.internet.MimeBodyPart |
getBodyPart(int index)
Get the specified Part. |
javax.mail.internet.MimeBodyPart |
getBodyPart(java.lang.String CID)
Get the Mimepart referred to by the given ContentID (CID). |
java.lang.ClassLoader |
getClassLoader()
|
java.lang.String |
getContentType()
Return the content-type |
int |
getCount()
Return the number of enclosed BodyPart objects. |
java.lang.Object |
getProperty(java.lang.String name)
Look for something in the hold-all 'bag' |
java.util.Enumeration |
getPropertyNames()
Return the entire list of 'names' in the hold-all 'bag' |
javax.mail.internet.MimeBodyPart |
getRootPart()
Find the root part. |
boolean |
isRootPartSet()
Returns true is setRootPart() has been called. |
java.lang.Class |
loadClass(java.lang.String className)
|
void |
readMultipart(javax.activation.DataSource ds)
Initialise MIME multipart object from a data source. |
java.lang.Object |
removeProperty(java.lang.String name)
Remove something from the hold-all 'bag' |
void |
setClassLoader(java.lang.ClassLoader cl)
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Store something in the hold-all 'bag' |
void |
setRootPart(byte[] b,
java.lang.String contentType)
Set the root part to a provided string (usually the SOAP envelope). |
void |
setRootPart(javax.mail.internet.MimeBodyPart part)
Adds the root BodyPart. |
void |
setRootPart(java.lang.String s,
java.lang.String contentType)
Set the root part to a provided string (usually the SOAP envelope). |
void |
setSubType(java.lang.String subtype)
Set the MultiPart Mime subtype. |
java.lang.String |
toString()
String representation for debug purposes. |
void |
writeTo(java.io.OutputStream os)
Encode the root part or multipart and write to an OutputStream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected javax.mail.internet.MimeMultipart parts
protected java.util.Hashtable bag
protected java.lang.ClassLoader loader
protected boolean rootPartSet
Constructor Detail |
public SOAPContext()
Method Detail |
public void readMultipart(javax.activation.DataSource ds) throws javax.mail.MessagingException
ds
- a DataSource object to read frompublic javax.mail.internet.MimeBodyPart getBodyPart(int index)
index
- the index of the desired Partpublic javax.mail.internet.MimeBodyPart getBodyPart(java.lang.String CID)
CID
- the ContentID of the desired partpublic javax.mail.internet.MimeBodyPart findBodyPart(java.lang.String uri)
Note: relative URIs not entirely implemented yet.
uri
- the URIpublic java.lang.String getBaseURI()
public javax.mail.internet.MimeBodyPart findPartByLocation(java.lang.String uri)
Note: relative URIs not entirely implemented yet. We also can't pick up the base URI from the multipart (transport) headers yet, only from the root (SOAP) part.
uri
- the URIpublic void addBodyPart(javax.mail.internet.MimeBodyPart part) throws javax.mail.MessagingException
part
- The Part to be appendedjavax.mail.MessagingException
- IllegalWriteException
- if the underlying
implementation does not support modification
of existing valuespublic void addBodyPart(javax.mail.internet.MimeBodyPart part, int index) throws javax.mail.MessagingException, java.lang.IllegalArgumentException
index
.
If index
is not the last one in the list,
the subsequent parts are shifted up. If index
is larger than the number of parts present, the
MimeBodyPart is appended to the end.part
- The BodyPart to be insertedindex
- Location where to insert the partjavax.mail.MessagingException
- IllegalWriteException
- if the underlying
implementation does not support modification
of existing valuesjava.lang.IllegalArgumentException
- if the part cannot be made
into an attachment for some reasonpublic void setRootPart(javax.mail.internet.MimeBodyPart part) throws javax.mail.MessagingException
Calling this method twice will replace the previous root part with the new one.
part
- The BodyPart to be insertedjavax.mail.MessagingException
- public void setRootPart(java.lang.String s, java.lang.String contentType) throws javax.mail.MessagingException, java.io.IOException
s
- The String to be insertedcontentType
- the Content-Type of the root partjavax.mail.MessagingException
- public void setRootPart(byte[] b, java.lang.String contentType) throws javax.mail.MessagingException
b
- The String to be insertedcontentType
- the Content-Type of the root partjavax.mail.MessagingException
-
public javax.mail.internet.MimeBodyPart getRootPart() throws javax.mail.MessagingException
javax.mail.MessagingException
- public void setSubType(java.lang.String subtype) throws javax.mail.MessagingException
subtype
- Subtypejavax.mail.MessagingException
- public boolean isRootPartSet()
public int getCount() throws javax.mail.MessagingException
public java.lang.String getContentType() throws javax.mail.MessagingException
public void writeTo(java.io.OutputStream os) throws java.io.IOException, javax.mail.MessagingException
os
- stream to write tojava.io.IOException
- javax.mail.MessagingException
- public void setProperty(java.lang.String name, java.lang.Object value)
public java.lang.Object getProperty(java.lang.String name)
public java.lang.Object removeProperty(java.lang.String name)
public java.util.Enumeration getPropertyNames()
public void setClassLoader(java.lang.ClassLoader cl)
public java.lang.ClassLoader getClassLoader()
public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |