There is no explicit Brenda Java-API I know of, but kegg provides a jar-file which I recommend you don't use.
There is a solution anyhow, I have never used MACiE btw.
Both database provide a standard compliant web-services interface over SOAP messages.
Web-services are a standardized way of language and system independent programmatic communication.
Both services have a WSDL file to describe the interface.
This description can be used to automatically generate client code using for example Axis2 a free open-source implementation of the SOAP protocol. IMHO this is the way to go.
So you will use Axis2 wsdl2code (or the Axis2 Eclipse-plugin) to generate exactly the free-open-source Java API you need.
A little edit and some issues from myself after having a look at the KEGG soap interface:
As often, KEGG is a bit misbehaving, so what I answered above is the theory, it is true in principle, but....
- The databinding (mapping of xml-schema types to Java types) that seems to work is
xmlbeans. The adb databinding gives an error. This is due to non-standard use of some
structures in the wsdl.
- Below is some source code demonstrating how an axis2 interface with xmlbeans data binding can be used. The only glitch is I cannot tell, how to set or read the ArrayOfstring. This glitch is IMHO KEGG's fault because they did only test with Axis1.
- Alternatives if nobody knows a better solution, try Axis1 with the jar-file from KEGG or try the Brenda WSDL.
Example use of Axis2/xmlbeans generated classes. The principle is the same for Brenda:
package keggtest;
import java.rmi.RemoteException;
import kegg.soap.ArrayOfstring;
import kegg.soap.GetPathwaysByGenesDocument;
import kegg.soap.GetPathwaysByGenesResponseDocument;
import kegg.soap.KEGGStub;
import kegg.soap.GetPathwaysByGenesDocument.GetPathwaysByGenes;
import org.apache.axis2.AxisFault;
public class keggclient {
/**
* @param args
*/
public static void main(String[] args) {
try {
KEGGStub stub = new KEGGStub("http://soap.genome.jp/KEGG.wsdl");
GetPathwaysByGenes getPathwaysByGenes = GetPathwaysByGenes.Factory
.newInstance();
ArrayOfstring genesIdList = ArrayOfstring.Factory.newInstance();
// add items to ArrayOfstring, but how?
getPathwaysByGenes.setGenesIdList(genesIdList);
GetPathwaysByGenesDocument get_pathways_by_genes = GetPathwaysByGenesDocument.Factory
.newInstance();
get_pathways_by_genes.setGetPathwaysByGenes(getPathwaysByGenes);
try {
GetPathwaysByGenesResponseDocument res = stub
.get_pathways_by_genes(get_pathways_by_genes);
System.err.println(res.getGetPathwaysByGenesResponse()
.getReturn());
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
And another edit, after trying the Brenda WSDL with axis2 wsdl2code, the result is not
very promising:
...
SEVERE: The binding operation getKeggPathway is RPC/literal. The message parts for this operation must use the type attribute as specificed by WS-I Basic Profile specification (4.4.1). Message part, ecNumber, violatesthis rule. Please remove the element attribute and use the type attribute.
...
So, if somebody has a better answer, including asking the service providers to adhere to standards. Apologies for testing after answering....