Search |
||
SMTP transport extension for JAX-WS RIPosted by jitu on May 6, 2007 at 8:05 PM PDT
Finally, we (vivek, kohsuke and I) put together a SMTP transport for JAX-WS !! JAX-WS works with various transports and it also provides plugin extensions to write any custom transport. SMTP transport takes advantage of these extensions. SMTP transport is implemented as a custom transport using Adapter extension on the server side and TransportTubeFactory.java on the client side. BasicsFor the communication to happen between "Me" and "You", there needs to be two inboxes: "My Inbox" and "Your Inbox". "Me" sends request messages to "You" and expect responses in "My Inbox". Similarly, "You" sends response messages to "My Inbox" in order to reach "Me".SMTP advantages
Client-side ProgrammingYou need jaxws-smtp.jar and JavaMail in your classpath for this to work. Typical client code would like this: public void testSmtp() {
This configures SMTPFeature with SMTP(sending) and POP3(receiving) configuration. This feature is used to create proxy. Once the endpoint address is set, then proxy can be used to invoke web service. Server-side ConfigurationJAX-WS SMTP extension can be used with JAX-WS Spring extension for more flexible configuration --- in particular to expose the same endpoint as both HTTP and SMTP. See the sample application for the complete example of how to put this all together by using Maven. <beans Alternatively, you can also configure the srever side programatically without Spring like this. Testing
We'll be showing a SMTP demo (along with JSON demo!) in our JavaOne session TS-4948 "Unleashing the Power of JAX-WS RI: Spring, Stateful Web Services, SMTP, and More", so mark your calendars accordingly ... »
Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|