com.ibm.wsdl.xml

Class WSDLWriterImpl

Implemented Interfaces:
WSDLWriter

public class WSDLWriterImpl
extends java.lang.Object
implements WSDLWriter

This class describes a collection of methods that allow a WSDL model to be written to a writer in an XML format that follows the WSDL schema.
Authors:
Matthew J. Duftler
Nirmal Mukhi

Method Summary

Document
getDocument(Definition wsdlDef)
Return a document generated from the specified WSDL model.
boolean
getFeature(String name)
Gets the value of the specified feature.
static void
main(String[] argv)
A test driver.
protected void
printBindingFaults(Map bindingFaults, Definition def, PrintWriter pw)
protected void
printBindingInput(BindingInput bindingInput, Definition def, PrintWriter pw)
protected void
printBindingOperations(List bindingOperations, Definition def, PrintWriter pw)
protected void
printBindingOutput(BindingOutput bindingOutput, Definition def, PrintWriter pw)
protected void
printBindings(Map bindings, Definition def, PrintWriter pw)
protected void
printDefinition(Definition def, PrintWriter pw)
protected void
printDocumentation(Element docElement, PrintWriter pw)
protected void
printExtensibilityAttributes(Class parentType, AttributeExtensible attrExt, Definition def, PrintWriter pw)
protected void
printExtensibilityElements(Class parentType, List extensibilityElements, Definition def, PrintWriter pw)
protected void
printFaults(Map faults, Definition def, PrintWriter pw)
protected void
printImports(Map imports, Definition def, PrintWriter pw)
protected void
printInput(Input input, Definition def, PrintWriter pw)
protected void
printMessages(Map messages, Definition def, PrintWriter pw)
protected void
printNamespaceDeclarations(Map namespaces, PrintWriter pw)
protected void
printOperations(List operations, Definition def, PrintWriter pw)
protected void
printOutput(Output output, Definition def, PrintWriter pw)
protected void
printParts(List parts, Definition def, PrintWriter pw)
protected void
printPortTypes(Map portTypes, Definition def, PrintWriter pw)
protected void
printPorts(Map ports, Definition def, PrintWriter pw)
protected void
printServices(Map services, Definition def, PrintWriter pw)
protected void
printTypes(Types types, Definition def, PrintWriter pw)
void
setFeature(String name, boolean value)
Sets the specified feature to the specified value.
void
writeWSDL(Definition wsdlDef, OutputStream sink)
Write the specified WSDL definition to the specified OutputStream.
void
writeWSDL(Definition wsdlDef, Writer sink)
Write the specified WSDL definition to the specified Writer.

Method Details

getDocument

public Document getDocument(Definition wsdlDef)
            throws WSDLException
Return a document generated from the specified WSDL model.
Specified by:
getDocument in interface WSDLWriter

getFeature

public boolean getFeature(String name)
            throws IllegalArgumentException
Gets the value of the specified feature.
Specified by:
getFeature in interface WSDLWriter
Parameters:
name - the name of the feature to get the value of.

main

public static void main(String[] argv)
            throws WSDLException
A test driver.
Usage:

  java com.ibm.wsdl.xml.WSDLWriterImpl filename|URL

    This test driver simply reads a WSDL document into a model
    (using a WSDLReader), and then serializes it back to
    standard out. In effect, it performs a round-trip test on
    the specified WSDL document.

printBindingFaults

protected void printBindingFaults(Map bindingFaults,
                                  Definition def,
                                  PrintWriter pw)
            throws WSDLException

printBindingInput

protected void printBindingInput(BindingInput bindingInput,
                                 Definition def,
                                 PrintWriter pw)
            throws WSDLException

printBindingOperations

protected void printBindingOperations(List bindingOperations,
                                      Definition def,
                                      PrintWriter pw)
            throws WSDLException

printBindingOutput

protected void printBindingOutput(BindingOutput bindingOutput,
                                  Definition def,
                                  PrintWriter pw)
            throws WSDLException

printBindings

protected void printBindings(Map bindings,
                             Definition def,
                             PrintWriter pw)
            throws WSDLException

printDefinition

protected void printDefinition(Definition def,
                               PrintWriter pw)
            throws WSDLException

printDocumentation

protected void printDocumentation(Element docElement,
                                  PrintWriter pw)
            throws WSDLException

printExtensibilityAttributes

protected void printExtensibilityAttributes(Class parentType,
                                            AttributeExtensible attrExt,
                                            Definition def,
                                            PrintWriter pw)
            throws WSDLException

printExtensibilityElements

protected void printExtensibilityElements(Class parentType,
                                          List extensibilityElements,
                                          Definition def,
                                          PrintWriter pw)
            throws WSDLException

printFaults

protected void printFaults(Map faults,
                           Definition def,
                           PrintWriter pw)
            throws WSDLException

printImports

protected void printImports(Map imports,
                            Definition def,
                            PrintWriter pw)
            throws WSDLException

printInput

protected void printInput(Input input,
                          Definition def,
                          PrintWriter pw)
            throws WSDLException

printMessages

protected void printMessages(Map messages,
                             Definition def,
                             PrintWriter pw)
            throws WSDLException

printNamespaceDeclarations

protected void printNamespaceDeclarations(Map namespaces,
                                          PrintWriter pw)
            throws WSDLException

printOperations

protected void printOperations(List operations,
                               Definition def,
                               PrintWriter pw)
            throws WSDLException

printOutput

protected void printOutput(Output output,
                           Definition def,
                           PrintWriter pw)
            throws WSDLException

printParts

protected void printParts(List parts,
                          Definition def,
                          PrintWriter pw)
            throws WSDLException

printPortTypes

protected void printPortTypes(Map portTypes,
                              Definition def,
                              PrintWriter pw)
            throws WSDLException

printPorts

protected void printPorts(Map ports,
                          Definition def,
                          PrintWriter pw)
            throws WSDLException

printServices

protected void printServices(Map services,
                             Definition def,
                             PrintWriter pw)
            throws WSDLException

printTypes

protected void printTypes(Types types,
                          Definition def,
                          PrintWriter pw)
            throws WSDLException

setFeature

public void setFeature(String name,
                       boolean value)
            throws IllegalArgumentException
Sets the specified feature to the specified value.

There are no minimum features that must be supported.

All feature names must be fully-qualified, Java package style. All names starting with javax.wsdl. are reserved for features defined by the JWSDL specification. It is recommended that implementation- specific features be fully-qualified to match the package name of that implementation. For example: com.abc.featureName

Specified by:
setFeature in interface WSDLWriter
Parameters:
name - the name of the feature to be set.
value - the value to set the feature to.

writeWSDL

public void writeWSDL(Definition wsdlDef,
                      OutputStream sink)
            throws WSDLException
Write the specified WSDL definition to the specified OutputStream.
Specified by:
writeWSDL in interface WSDLWriter
Parameters:
wsdlDef - the WSDL definition to be written.
sink - the OutputStream to write the xml to.

writeWSDL

public void writeWSDL(Definition wsdlDef,
                      Writer sink)
            throws WSDLException
Write the specified WSDL definition to the specified Writer.
Specified by:
writeWSDL in interface WSDLWriter
Parameters:
wsdlDef - the WSDL definition to be written.
sink - the Writer to write the xml to.