Thursday, January 8, 2009

Connect to KEGG by KEGGAPI

These two days I spend much time on the codes for connecting KEGG by its API. Fortunately the KEGGAPI is updated to adapt to use AXIS 1.4 version, which means that I don't need to do the pretreatment as described at the website.

Here I write some code according to its Javadoc. Having got all the ports opened, it runs pretty well. Thus I know where the previous problem is: The remote machine doesn't allow the script out because only the port 3128 is open.


package org.tingting.bn.mn.networkbuilder.test;

import org.tingting.bn.mn.networkbuilder.domain.KeggConnector;

import keggapi.Definition;
import keggapi.KEGGPortType;

public class TestKeggConnector {

/**
* @param args
*/

public static void main(String[] args){

KeggConnector conn = new KeggConnector();
KEGGPortType serv;

try{
serv = conn.getServ();
Definition result[] = serv.list_pathways("hsa");

for( int i = 0; i <>

No comments: