This document provides a quick overview of how to use the Woden4SAWSDL object model. This includes code samples showing how to kickstart the usage of Woden4SAWSDL
This object model is built using on the Woden object model from Apache Software Foundation.
The following jar files are needed in the classpath in order to use Woden4SAWSDL
Description description = edu.uga.cs.lsdis.wsdl20.utilSAWSDLUtil.getDescription(url);
Note the variable url holds the full path of the .WSDL file.
Description d = getDescription();
Interface[] interfaces = d.getInterfaces();
ModelReference modelRef = SAWSDLUtil.getModelRef(interfaces[0])
The getDescription() method returns Declaration object. The modelRef
object can be used to obtain the list of model reference URI's
Description d = getDescription();
ElementDeclaration elDecl = d.getElementDeclaration
(new QName("http://myns", "myElt"));
ModelReference mref = SAWSDLUtil.getModelRef(elDecl);
Note that http://myns and myElt are the namespace and the localname respectively
of the element in question.
A similar method can be applied to types.
Description d = getDescription();
TypeDefinition definition = desc.getTypeDefinition
(new QName("http://myns", "myType"));
ModelReference mref = SAWSDLUtil.getModelRef(definition);
There are respective methods in SAWSDLUtil class that can be used to extract
lifting and lowering mappings too. The following examples show how to use the
Utiliy methods to obtain such mappings.
Description d = getDescription();
TypeDefinition definition = desc.getTypeDefinition
(new QName("http://myns", "myType"));
SchemaMapping schemaMapping = SAWSDLUtil.getLifingMapping(tDec);
The schema mapping object contains a similar list of URI's as of the
model Reference.