See: Description
The wsdl model provides a read and write model based on XDM and XAM.
wsdl.model This package provides API's for obtaining a wsdl model using the factory pattern as well as reading and writing the wsdl structure. This package is made up mostly of interfaces, which are not expected to be implemented by the client. The entry point is the wsdl model factory. The components are based on the structure of wsdl and the names should reflect element and attribute names from the specification. wsdl.model.visitor Generic visitor pattern support (such as empty and deep visitors) as well as visitors for finding usages. wsdl.model.spi The SPI package provides the ability to plug-in strongly typed extensibility elements, which are used in every concrete wsdl for bindings. wsdl.model.extensions.soap Strongly typed extensibility elements for the SOAP binding. wsdl.model.extensions.xsd Strongly typed extensibility element for Schema. This supports embedding the schema model within the WSDL model to introspect the types section of WSDL.The typical client of the WSDL model would be a tool author requiring read or write access to WSDL.
FileObject wsdlFileObj = ...; // get file object for WSDL
ModelSource source =
org.netbeans.modules.xml.xam.locator.api.Utilities.getModelSource(wsdlFileObj, true);
WSDLModel model = WSDLModelFactory.getDefault().getModel(source);
// access port types
Collection<PortType> portTypes = model.getDefinitions().getPortTypes();
// add port type
PortType pt = model.getFactory().createPortType();
pt.setName("newPortType");
// pt manipulation before adding to model, name, etc.
try {
// model must be manipulated in transaction
model.startTransaction();
// add port type to model
model.getDefinitions().addPortType(pt);
} finally {
model.endTransaction();
}
|
|
The sources for the module are in the Apache Git repositories or in the GitHub repositories.
The API's are currently exposed through the friend mechanism, thus another module would need to be added to the friends list.
Read more about the implementation in the answers to architecture questions.