以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Java/Eclipse 』  (http://bbs.xml.org.cn/list.asp?boardid=41)
----  [求助]java填写表单和手动填写表单,网站根据表单信息生成邮件返回,两种方式返回的邮件内容不同  (http://bbs.xml.org.cn/dispbbs.asp?boardid=41&rootid=&id=89936)


--  作者:littleeinstein
--  发布时间:3/29/2011 12:27:00 PM

--  [求助]java填写表单和手动填写表单,网站根据表单信息生成邮件返回,两种方式返回的邮件内容不同

网站为:http://wks16338.biology.ualberta.ca/proteus2/

一、手动方式
填写好蛋白质序列如图
http://p13.freep.cn/p.aspx?u=v20_p1_photo_1103291150207216_0.jpg
填写好邮箱地址如图
http://p13.freep.cn/p.aspx?u=v20_p1_photo_1103291152171616_0.jpg
再点击submit按钮提交。

返回的消息页面一个消息页面如图
http://p13.freep.cn/p.aspx?u=v20_p1_photo_1103291154269755_0.jpg

邮箱中邮件内容如下:

THANK YOU FOR USING PROTEUS2
************************************************************
PROTEUS2 is operated and maintained by the Genome Canada  
Bioinformatics Help Desk (http://gchelpdesk.ualberta.ca) at  
the University of Alberta, Edmonton, AB, Canada. If you have  
any questions or queries about the server or its output,  
please contact: info@gchelpdesk.ualberta.ca
************************************************************
Below are the structure predictions for your proteins  
obtained from Proteus2. Please click on the hyperlinked  
protein name to obtain more information about the sequence  
analysis and structure prediction results. The hyperlinks  
will remain active for 30 days from the time/date of  
completion. After this period, the data will be deleted
from the Proteus2 server.  

H = Helix, E = Beta Strand, C = Coil, T = Memebrane helix,  
B = Membrane strand, S = Signal peptide, c = Cleavage site  
************************************************************
>1lmb3

PLTQEQLEDA RRLKAIYEKK KNELGLSQES VADKMGMGQS GVGALFNGIN  
CCCHHHHHHH HHHHHHHHHH HHCCCCCHHH HHHHHCCCHH HHHHHHHCCC  

ALNAYNAALL AKILKVSVEE FSPSIAREIY EMYEAVS
CCCHHHHHHH HHHHCCCCCC CCHHHHHHHH HHHHHCC


二、用java提交post请求方式
我的代码如下:
package nettest;
import java.net.*;
import java.io.*;
/**
*
* @author bluetears
*/
public class NetTest {

  /**
  * @param args the command line arguments
  */
  public static void main(String[] args) throws Exception {
  // TODO code application logic here
  int c;
  URL hp = new URL("http://wks16338.biology.ualberta.ca/proteus2/Submit.do");
  URLConnection hpCon = hp.openConnection();

  hpCon.setDoOutput(true);
  OutputStreamWriter out = new OutputStreamWriter(hpCon.getOutputStream());
  String seq=">1lmb3\nPLTQEQLEDARRLKAIYEKKKNELGL
SQESVADKMGMGQSGVGALFNGINALNAYNAALLAKILKVSV
EEFSPSIAREIYEMYEAVS";
  String emailAdd = "XXXXX@163.com";
  String str = String.format("sequence=%s&outputMethod=%s&emailInput=%s", seq,"email",emailAdd);
  out.write(str);
  out.flush();
  out.close();
    
  BufferedReader reader = new BufferedReader(new InputStreamReader(hpCon.getInputStream()));
  String line = null;
  while ((line=reader.readLine())!=null) {
  System.out.println(line);
  }
  }
}

得到的返回消息跟前一种手动方式的消息页面一样。

邮件信息的内容如下,缺了一块信息:

THANK YOU FOR USING PROTEUS2
************************************************************
PROTEUS2 is operated and maintained by the Genome Canada  
Bioinformatics Help Desk (http://gchelpdesk.ualberta.ca) at  
the University of Alberta, Edmonton, AB, Canada. If you have  
any questions or queries about the server or its output,  
please contact: info@gchelpdesk.ualberta.ca
************************************************************
Below are the structure predictions for your proteins  
obtained from Proteus2. Please click on the hyperlinked  
protein name to obtain more information about the sequence  
analysis and structure prediction results. The hyperlinks  
will remain active for 30 days from the time/date of  
completion. After this period, the data will be deleted
from the Proteus2 server.  

H = Helix, E = Beta Strand, C = Coil, T = Memebrane helix,  
B = Membrane strand, S = Signal peptide, c = Cleavage site  
************************************************************

请问上面的情况是怎么回事,我真是百思不得其解,请教高手。


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
5,611.328ms