http://demon-lord.com/index.php?SV01

PCへ戻る

ハード構成

項目 詳細 備考
M/B ASUS M3A BIOS 1001
プロセッサ AMD Athlon 64 X2 5200+ (CS) L1 Cache 1MBx2, rev.F2, 89W
メモリ DDR2-800 / PC6400 1G 計4G / 全4スロット使用
DDR2-800 / PC6400 1G
DDR2-800 / PC6400 1G
DDR2-800 / PC6400 1G
HDD Hitachi DESKSTAR HDT725032VLA360 (320G) SATA, SB600 Southbridge RAID Controller による RAID1構成
Hitachi DESKSTAR HDT725032VLA360 (320G)
DVD PIONEER DVD-RW DVR-111D UDMA66 接続
ビデオ ATI X1950 256M
NIC Intel PRO/100 S Desktop Adapter 増設分

ソフトウェア構成

項目 名称 バージョン履歴 備考
日付 バージョン
OS openSUSE 10.3 x86_64 2008.08.10 2.6.22.18-0.2-default 特にオプションを選ばず素で導入
OS 追加コンポーネント kernel-source 2008.08.10 kernel-source-2.6.22.18-0.2
ベンダドライバ ATI Catalyst Proprietary Linux x86_64 Display Driver 2008.08.10 8.7
2008.08.30 8.8
導入アプリ gcc 2008.08.10 gcc-4.2-24
VMware Workstation 6 2008.08.10 VMware Workstation 6.0.4 build 93057
2008.08.30 VMware Workstation 6.0.5 build 109488

導入・設定

OS導入時の問題点

ブートローダにディスクの情報が登録されない

  • 原因
    恐らく、オンボードのRAIDコントローラで作成した RAID1 のディスクがインストーラから見えていない。
  • 対応
    インストール中、ブートローダ設定にて[ブートローダの設定] -> [ブートローダのインストール]タブ -> [その他] -> [設定ファイルの編集]にて下記エントリを追加。
    (hd0,0) /dev/mapper/nvidia_ejaaeejb_part5
    (hd0)   /dev/mapper/nvidia_ejaaeejb
    • "nvidia_ejaaeejb_part5", "nvidia_ejaaeejb" の部分は RAID を構成時に確認する。
    • 設定の実体は /boot/grub/device.map

OS設定

追加パッケー�2.context.MessageContext; +import org.apache.axis2.AxisFault; +import org.apache.axis2.Constants; +import org.apache.axis2.description.Parameter; +import org.apache.axis2.builder.BuilderUtil;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
+import javax.mail.Part;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeBodyPart;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.IOException;
+import javax.mail.internet.ContentType;
+import javax.mail.internet.ParseException;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.activation.DataHandler;
+
+import java.io.*;
+import java.util.List;
+import java.util.ArrayList;

public class MailUtils extends BaseUtils {

@@ -145,4 +164,161 @@
        }
    }

+    @Override
+ public void setSOAPEnvelope(Object message, MessageContext msgContext, String contentType) throws AxisFault {
+
+        if (message instanceof MimeMessage &&
+ (contentType.toLowerCase().contains("multipart/ alternative") || + contentType.toLowerCase().contains("multipart/ mixed"))) {
+
+ MultipartParser mp = new MultipartParser((MimeMessage) message);
+            try {
+                mp.parse();
+            } catch (Exception e) {
+ throw new AxisFault("Error parsing multipart message", e);
+            }
+
+            SOAPFactory soapFactory = new SOAP11Factory();
+            SOAPEnvelope envelope = null;
+            StAXBuilder builder = null;
+            String charSetEnc = null;
+
+            try {
+                if (mp.getMainTextContentType() != null) {
+ charSetEnc = new ContentType(mp.getMainTextContentType()).getParameter("charset");
+                }
+            } catch (ParseException ignore) {
+ charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
+            }
+
+            try {
+ // select primary message - in the following order of priority
+                // SOAP 1.2, SOAP 1.1 / POX, text/plain, text/html
+ if (mp .getMainTextContentType ().contains(SOAP12Constants.SOAP_12_CONTENT_TYPE) || + mp .getMainTextContentType ().contains((SOAP11Constants.SOAP_11_CONTENT_TYPE))) {
+                    builder = BuilderUtil.getSOAPBuilder(
+ new ByteArrayInputStream(mp.getMainText().getBytes(charSetEnc)), charSetEnc); + envelope = (SOAPEnvelope) builder.getDocumentElement();
+
+ } else if (mp.getMainTextContentType().toLowerCase().contains(("text/plain"))) {
+
+ // pick the name of the element that will act as the wrapper element for the + // non-xml payload. If service doesn't define one, default + Parameter wrapperParam = msgContext.getAxisService().
+                        getParameter(BaseConstants.WRAPPER_PARAM);
+
+                    QName wrapperQName = null;
+                    OMElement wrapper = null;
+                    if (wrapperParam != null) {
+ wrapperQName = BaseUtils.getQNameFromString(wrapperParam.getValue());
+                    }
+
+ OMTextImpl textData = (OMTextImpl) soapFactory.createOMText(mp.getMainText());
+
+                    if (wrapperQName == null) {
+ wrapperQName = BaseConstants.DEFAULT_TEXT_WRAPPER;
+                    }
+ wrapper = soapFactory.createOMElement(wrapperQName, null);
+                    wrapper.addChild(textData);
+
+                    envelope = soapFactory.getDefaultEnvelope();
+                    envelope.getBody().addChild(wrapper);
+                }
+            } catch (XMLStreamException e) {
+ handleException("Error building SOAP or POX payload", e);
+            } catch (UnsupportedEncodingException e) {
+ handleException("Encoding error building SOAP or POX payload", e);
+            }
+
+            // Set the encoding scheme in the message context
+ msgContext .setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
+
+            String charEncOfMessage =
+                builder == null ? null :
+ builder.getDocument() == null ? null : builder.getDocument().getCharsetEncoding();
+
+            if (StringUtils.isNotBlank(charEncOfMessage) &&
+                StringUtils.isNotBlank(charSetEnc) &&
+                !charSetEnc.equalsIgnoreCase(charEncOfMessage)) {
+ handleException("Charset encodings differs from whats used in the payload");
+            }
+
+            msgContext.setEnvelope(envelope);
+
+            int cid = 1;
+            for (DataHandler dh : mp.getAttachments()) {
+ msgContext.addAttachment(Integer.toString(cid++), dh);
+            }
+
+        } else {
+            super.setSOAPEnvelope(message, msgContext, contentType);
+        }
+    }
+
+    private class MultipartParser {
+
+        final MimeMessage msg;
+        private String mainText = null;
+        private String mainTextContentType = null;
+ private List<DataHandler> attachments = new ArrayList<DataHandler>();
+
+        MultipartParser(MimeMessage msg) {
+            this.msg = msg;
+        }
+
+        public void parse() throws MessagingException, IOException {
+            Multipart mp = (Multipart) msg.getContent();
+            for (int i=0; i<mp.getCount(); i++) {
+                buildContentMap(mp.getBodyPart(i));
+            }
+        }
+
+ private void buildContentMap(Part p) throws MessagingException, IOException {
+
+            if (p.isMimeType("multipart/alternative")) {
+
+                Multipart mp = (Multipart) p.getContent();
+                for (int i = 0; i < mp.getCount(); i++) {
+
+                    Part bp = mp.getBodyPart(i);
+                    processBodyPart(bp);
+                }
+
+            } else if (p.isMimeType("multipart/*")) {
+                Multipart mp = (Multipart) p.getContent();
+                for (int i = 0; i < mp.getCount(); i++) {
+                    buildContentMap(mp.getBodyPart(i));
+                }
+
+            } else {
+                processBodyPart(p);
+            }
+        }
+
+ private void processBodyPart(Part bp) throws MessagingException, IOException { + if (bp.isMimeType(SOAP12Constants.SOAP_12_CONTENT_TYPE) || + bp.isMimeType(SOAP11Constants.SOAP_11_CONTENT_TYPE) ||
+                bp.isMimeType("text/plain")) {
+
+                if (mainText == null) {
+                    mainText = (String) bp.getContent();
+                    mainTextContentType = bp.getContentType();
+                }
+            } else {
+                attachments.add(bp.getDataHandler());
+            }
+        }
+
+        public String getMainText() {
+            return mainText;
+        }
+
+        public String getMainTextContentType() {
+            return mainTextContentType;
+        }
+
+        public List<DataHandler> getAttachments() {
+            return attachments;
+        }
+    }
}

Modified: synapse/trunk/java/modules/transports/src/main/java/org/ apache/synapse/transport/mail/PollTableEntry.java
URL: 
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/mail/PollTableEntry.java?rev=694732&r1=694731&r2=694732&view=diff
= = = = = = = = ====================================================================== --- synapse/trunk/java/modules/transports/src/main/java/org/apache/ synapse/transport/mail/PollTableEntry.java (original) +++ synapse/trunk/java/modules/transports/src/main/java/org/apache/ synapse/transport/mail/PollTableEntry.java Fri Sep 12 09:22:45 2008
@@ -40,6 +40,7 @@
    // operation after mail check
    public static final int DELETE = 0;
    public static final int MOVE   = 1;
+    public static final int LEAVE  = 2;

    /** The email address mapped to the service */
    private InternetAddress emailAddress = null;




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to