tinyMOBY Wiki
Semantically enriched WSDL 2.0 descriptors for BioMoby services
Brought to you by:
redmitry
tinyMOBY is implemented as an extension so parsing WSDL 2.0 descriptors is is done through tinyWSDL:
WSDL2Factory factory = WSDL2Factory.newInstance();
WSDL2Reader reader = factory.getWSLD2Reader();
InputSource source = new InputSource("http://myplace/moby.wsdl");
Description description = reader.read(source);
BioMoby encodes its input/output inside an "xs:string".
The link between WSDL 2.0 inputs/outputs is done via SAWSDL annotations:
SAWSDLInterfaceMessageReferenceExtensions ext1 = (SAWSDLInterfaceMessageReferenceExtensions) interfaceOperationInput.getComponentExtensions(WSDLPredefinedExtension.SAWSDL.URI);
SAWSDLElementDeclarationExtensions ext2 = ext1.getSAWSDLElementDeclarationExtensions();
List<URI> modelReferences = ext2.getModelReferences();
The example of SAWSDL modelReference:
urn:lsid:mmb.pcb.ub.es#xmlns(ns1=wsdl.interfaceMessageReference(addDisulphideBondsFromPDBText/addDisulphideBondsFromPDBText/In))wsdl.typeDefinition(ns1:structure,http://www.w3.org/TR/rdf-syntax-grammar)
Then, the reference may be used to obtain a complete BioMoby datatype definition in BioMoby API model:
MobyDescription mobyDescriptionExtensions = new MobyDescription(description);
for (URI modelReference : modelReferences) {
TypeDefinition type = mobyDescriptionExtensions.getTypeDefinition(modelReference);
Object object= type.getContent();
}
The Object object is one of the BioMoby parameter types (Simple, Collection, Parameter).