Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

When we have watches on SDN and there is an interesting post, we always have something in our mind. It’s all about a thirst of having a new feature enabling SDN users to reply to watches which gets posted directly in SDN! This is my small contribution to SDN for implementing this new feature. I am sorry if this feature is already present and currently disabled. Even if it is so, the code may be useful to several others who may use it in Webdynpro/Java appliciation for other purposes! This blog is a small initiative towards SDN and Open Source by Craig Cmehil

Introduction

The blog is about implementing a new feature in SDN, which enables users to post directly in SDN by replying from their outlook. In this part of the blog series, I will be explaining about the architectural design how it’s going to work.

Design

Explanations for the numbers in the diagram

  1. Mail from SDN subscribed to watch a forum / post.
  2. Reply post from email to POP3 / IMAP server.
  3. Mail fetched by SDN_JPost, analyses and posting it into SDN.
  4. Posting it directly into SDN, identifying the specific forum / thread using the user id and password.

The whole implementation can be divided into two major modules (from Java perspective) namely

  1. Fetching emails from POP3/IMAP server and parsing it to find the parameters (email, thread id and forum id)
  2. Posting it into the SDN forum.

Planning

In development environment, I have a pop3 server running to which I will be sending my replies. SDN_JPost is a simple Java code or thread, constantly fetching mails from the pop3 server, parsing it and posting the reply to SDN.

The key factor in the whole implementation is about posting the reply from the email to SDN. For this, first we must understand the landscape of SDN from outside well. Posting into SDN requires a user id and password. Since email can be used for user id, the email from which the mail is sent can be used as user id. There must be some way SDN_JPost must know the password for the user id/email. Right now, here in development environment, I preferred to send the password as the first line in my message (though it is not preferred, this is until the java code has direct access to user id / passwords).

Key Design

Once thread id, forum id, user id and password is known to SDN_JPost, the reply is directly posted into SDN Forums. But how is it done? First, using the user id and password, login is done by SDN_JPost which saves all session cookies in memory and posts the reply to the corresponding forum. Since session cookies are in memory, the post is done successfully. The session cookies are cleared for processing the next reply from the mail box. Since, the post is authorized initially by the user’s id and password; there cannot be any flaw in between.

In the next blog of this series, we shall see the complete implementation (with source code) of SDN_JPost (the key Java program) fetching email from the POP3 server. Finally in the last blog of the series, we will be seeing the most important functionality of SDN_JPost, posting the mail reply directly to SDN Forums.

sap.user72/blog/2005/12/23/reply-to-watches-get-directly-posted-on-sdn-forums-part-150-2

9 Comments