Oracle® XML Java API Reference
Release 1 (10.1)

B12024-01

org.apache.soap.transport.smtp
Class SOAPSMTPConnection

java.lang.Object
  |
  +--org.apache.soap.transport.smtp.SOAPSMTPConnection
All Implemented Interfaces:
SOAPTransport

public class SOAPSMTPConnection
extends java.lang.Object
implements SOAPTransport

SOAPSMTPConnection is an implementation of the SOAPTransport interface for SMTP.


Constructor Summary
SOAPSMTPConnection(java.lang.String fromAddr, java.lang.String subject, java.lang.String smtpServer, long popPollDelay, java.lang.String popServer, java.lang.String popLogin, java.lang.String popPassword)
          Constructor: sets up this SMTP connection for sending and receiving a SOAP envelope via SMTP and POP3, respectively.

 

Method Summary
 java.util.Hashtable getHeaders()
          Return access to headers generated by the protocol.
 SOAPContext getResponseSOAPContext()
          Return the SOAPContext associated with the response.
 java.io.BufferedReader receive()
          Return a buffered reader to receive back the response to whatever was sent to whatever.
 void send(java.net.URL toAddr, java.lang.String actionURI, java.util.Hashtable headers, Envelope env, SOAPMappingRegistry smr, SOAPContext ctx)
          This method is used to request that an envelope be sent.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SOAPSMTPConnection

public SOAPSMTPConnection(java.lang.String fromAddr,
                          java.lang.String subject,
                          java.lang.String smtpServer,
                          long popPollDelay,
                          java.lang.String popServer,
                          java.lang.String popLogin,
                          java.lang.String popPassword)
Constructor: sets up this SMTP connection for sending and receiving a SOAP envelope via SMTP and POP3, respectively.
Parameters:
fromAddr - the sender's address
subject - subject of the email message
smtpServer - the SMTP server to use to send
popPollDelay - the number of millis to sleep between response polls
popServer - hostname of POP3 server to receive from
popLogin - login ID to receive mail at
popPassword - password for login
Method Detail

send

public void send(java.net.URL toAddr,
                 java.lang.String actionURI,
                 java.util.Hashtable headers,
Envelope env,
SOAPMappingRegistry smr,
SOAPContext ctx)
          throws SOAPException
This method is used to request that an envelope be sent. Note: sending SOAPContext not implemented yet.
Specified by:
send in interface SOAPTransport
Parameters:
headers - any other header fields to go to as protocol headers [IGNORED right now]
env - the envelope to send
smr - the XML<->Java type mapping registry (passed on)
ctx - the request SOAPContext
toAddr - the URL to send the envelope to
actionURI - the SOAPAction header field value
Throws:
SOAPException - with appropriate reason code if problem

receive

public java.io.BufferedReader receive()
Return a buffered reader to receive back the response to whatever was sent to whatever. This does a blocking wait until a response is received .. don't do it lightly. Should take into account timeouts and such in the future.
Specified by:
receive in interface SOAPTransport
Returns:
a reader to read the results from or null if that's not possible.

getHeaders

public java.util.Hashtable getHeaders()
Return access to headers generated by the protocol.
Specified by:
getHeaders in interface SOAPTransport
Returns:
a hashtable containing all the headers

getResponseSOAPContext

public SOAPContext getResponseSOAPContext()
Return the SOAPContext associated with the response. Not implemented yet!
Specified by:
getResponseSOAPContext in interface SOAPTransport
Returns:
response SOAPContext

Oracle® XML Java API Reference
Release 1 (10.1)

B12024-01