See directions for patches at http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/SubmitPatches
--- Clay Graham <[EMAIL PROTECTED]> wrote: > Absolutely. > > I am not real familiar with the development process of axis, but I am > more than willing to try! > > What I will try to do is make a nice package based on the existing docs, > and then submit it (where?). > > > > ----------------------------------------- > Clay Graham > President > newObjectivity, Inc. > making the mobile-world-office > http://www.newobjectivity.com/ > > > > -----Original Message----- > From: Tom Jordahl [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 03, 2003 1:50 PM > To: '[EMAIL PROTECTED]' > Subject: RE: Stateful web services. > > > > Clay, > > This is great. Do you think you could check out the current Axis HTML > docs and see if you can put together a patch that would integrate this > in to it? > > Your code could just be new files in the samples directory. > > If you could do that, then put the info in a Bugzilla report, that would > increase the chances that someone (me) would check it in to the tree for > others. > > -- > Tom Jordahl > Macromedia Server Development > > -----Original Message----- > From: Clay Graham [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 03, 2003 3:22 PM > To: [EMAIL PROTECTED] > Subject: RE: Stateful web services. > > [SOLUTION] > > I am including the full solution because I think this is the type of > thing everybody wants.... > > ##################################################################### > > 1. Create your service > > /* > * NOIMailService.java > * > * Created on April 2, 2003, 5:19 PM > */ > > package com.noi.mailservlet.web.services; > import javax.activation.*; > import java.util.*; > import javax.ejb.*; > import javax.mail.*; > import javax.mail.internet.*; > import javax.mail.search.*; > import java.io.*; > > /** > * > * @author clay > */ > public class NOIMailService { > > /** Holds value of property username. */ > private String username; > > /** Holds value of property password. */ > private String password; > > /** Holds value of property hostname. */ > private String hostname; > > private boolean connected; > > /** Holds value of property protocol. */ > private String protocol; > > private static final String loginmbox = "INBOX"; > > private Store store; > private Session session; > private URLName url; > > /** Creates a new instance of NOIMailService */ > public NOIMailService() { > this.connected = false; > this.protocol = "imap"; > } > > > public boolean login(String protocol, String username, String > password, String hostname) > { > > this.protocol = protocol; > this.username = username; > this.password = password; > this.hostname = hostname; > > try{ > url = new URLName( > this.protocol, > this.hostname, > -1, > this.loginmbox, > this.username, > this.password); > > Properties props = System.getProperties(); > > if (hostname != null) > props.put("mail.smtp.host", this.hostname); > else if (props.getProperty("mail.smtp.host") == null) > props.put("mail.smtp.host", "localhost"); > > this.session = Session.getDefaultInstance(props, null); > this.session.setDebug(true); > > PasswordAuthentication pw = new > PasswordAuthentication(url.getUsername(), this.url.getPassword()); > this.session.setPasswordAuthentication(url, pw); > > this.store = this.session.getStore(url); > this.store.connect(); > this.connected = true; > return this.connected; > } > catch(Exception e) > { > this.connected = false; > return this.connected; > } > > } > > public boolean isConnected() > { > return this.connected; > } > > public boolean sendStatelessMessage(String protocol, String > username, String password, String hostname, String to, String cc, String > bcc, String subject, String body) > { > if(this.login(protocol, username, password, hostname)) > { > try { > > Message msg = new MimeMessage(this.session); > > //to > InternetAddress[] toAddrs = null; > if ((to != null) && !to.equals("")) { > toAddrs = InternetAddress.parse(to, false); > msg.setRecipients(Message.RecipientType.TO, > toAddrs); > } > else > return false; > > > //sent date > msg.setSentDate(Calendar.getInstance().getTime()); > > //from > String fromAddress = url.getUsername() + > "@"+url.getHost(); > msg.setFrom(new InternetAddress(fromAddress)); > > //cc > InternetAddress[] ccAddrs = null; > if ((cc != null) && !cc.equals("")) { > ccAddrs = InternetAddress.parse(cc, false); > msg.setRecipients(Message.RecipientType.CC, > ccAddrs); > } > > InternetAddress[] bccAddrs = null; > if ((bcc != null) && !bcc.equals("")) { > bccAddrs = InternetAddress.parse(bcc, false); > msg.setRecipients(Message.RecipientType.BCC, > toAddrs); > } > > //subject > === message truncated === ===== Davanum Srinivas - http://webservices.apache.org/~dims/ __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com