Package com.ibm.wsdl.xml
Class WSDLWriterImpl
- java.lang.Object
-
- com.ibm.wsdl.xml.WSDLWriterImpl
-
- All 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.- Author:
- Matthew J. Duftler, Nirmal Mukhi
-
-
Constructor Summary
Constructors Constructor Description WSDLWriterImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.DocumentgetDocument(Definition wsdlDef)Return a document generated from the specified WSDL model.booleangetFeature(java.lang.String name)Gets the value of the specified feature.static voidmain(java.lang.String[] argv)A test driver.protected voidprintBindingFaults(java.util.Map bindingFaults, Definition def, java.io.PrintWriter pw)protected voidprintBindingInput(BindingInput bindingInput, Definition def, java.io.PrintWriter pw)protected voidprintBindingOperations(java.util.List bindingOperations, Definition def, java.io.PrintWriter pw)protected voidprintBindingOutput(BindingOutput bindingOutput, Definition def, java.io.PrintWriter pw)protected voidprintBindings(java.util.Map bindings, Definition def, java.io.PrintWriter pw)protected voidprintDefinition(Definition def, java.io.PrintWriter pw)protected voidprintDocumentation(org.w3c.dom.Element docElement, Definition def, java.io.PrintWriter pw)protected voidprintExtensibilityAttributes(java.lang.Class parentType, AttributeExtensible attrExt, Definition def, java.io.PrintWriter pw)protected voidprintExtensibilityElements(java.lang.Class parentType, java.util.List extensibilityElements, Definition def, java.io.PrintWriter pw)protected voidprintFaults(java.util.Map faults, Definition def, java.io.PrintWriter pw)protected voidprintImports(java.util.Map imports, Definition def, java.io.PrintWriter pw)protected voidprintInput(Input input, Definition def, java.io.PrintWriter pw)protected voidprintMessages(java.util.Map messages, Definition def, java.io.PrintWriter pw)protected voidprintNamespaceDeclarations(java.util.Map namespaces, java.io.PrintWriter pw)protected voidprintOperations(java.util.List operations, Definition def, java.io.PrintWriter pw)protected voidprintOutput(Output output, Definition def, java.io.PrintWriter pw)protected voidprintParts(java.util.List parts, Definition def, java.io.PrintWriter pw)protected voidprintPorts(java.util.Map ports, Definition def, java.io.PrintWriter pw)protected voidprintPortTypes(java.util.Map portTypes, Definition def, java.io.PrintWriter pw)protected voidprintServices(java.util.Map services, Definition def, java.io.PrintWriter pw)protected voidprintTypes(Types types, Definition def, java.io.PrintWriter pw)voidsetFeature(java.lang.String name, boolean value)Sets the specified feature to the specified value.voidwriteWSDL(Definition wsdlDef, java.io.OutputStream sink)Write the specified WSDL definition to the specified OutputStream.voidwriteWSDL(Definition wsdlDef, java.io.Writer sink)Write the specified WSDL definition to the specified Writer.
-
-
-
Method Detail
-
setFeature
public void setFeature(java.lang.String name, boolean value) throws java.lang.IllegalArgumentExceptionSets 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:
setFeaturein interfaceWSDLWriter- Parameters:
name- the name of the feature to be set.value- the value to set the feature to.- Throws:
java.lang.IllegalArgumentException- if the feature name is not recognized.- See Also:
getFeature(String)
-
getFeature
public boolean getFeature(java.lang.String name) throws java.lang.IllegalArgumentExceptionGets the value of the specified feature.- Specified by:
getFeaturein interfaceWSDLWriter- Parameters:
name- the name of the feature to get the value of.- Returns:
- the value of the feature.
- Throws:
java.lang.IllegalArgumentException- if the feature name is not recognized.- See Also:
setFeature(String, boolean)
-
printDefinition
protected void printDefinition(Definition def, java.io.PrintWriter pw) throws WSDLException
- Throws:
WSDLException
-
printServices
protected void printServices(java.util.Map services, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printPorts
protected void printPorts(java.util.Map ports, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printBindings
protected void printBindings(java.util.Map bindings, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printBindingOperations
protected void printBindingOperations(java.util.List bindingOperations, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printBindingInput
protected void printBindingInput(BindingInput bindingInput, Definition def, java.io.PrintWriter pw) throws WSDLException
- Throws:
WSDLException
-
printBindingOutput
protected void printBindingOutput(BindingOutput bindingOutput, Definition def, java.io.PrintWriter pw) throws WSDLException
- Throws:
WSDLException
-
printBindingFaults
protected void printBindingFaults(java.util.Map bindingFaults, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printPortTypes
protected void printPortTypes(java.util.Map portTypes, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printOperations
protected void printOperations(java.util.List operations, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printInput
protected void printInput(Input input, Definition def, java.io.PrintWriter pw) throws WSDLException
- Throws:
WSDLException
-
printOutput
protected void printOutput(Output output, Definition def, java.io.PrintWriter pw) throws WSDLException
- Throws:
WSDLException
-
printFaults
protected void printFaults(java.util.Map faults, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printMessages
protected void printMessages(java.util.Map messages, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printParts
protected void printParts(java.util.List parts, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printExtensibilityAttributes
protected void printExtensibilityAttributes(java.lang.Class parentType, AttributeExtensible attrExt, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printDocumentation
protected void printDocumentation(org.w3c.dom.Element docElement, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printTypes
protected void printTypes(Types types, Definition def, java.io.PrintWriter pw) throws WSDLException
- Throws:
WSDLException
-
printImports
protected void printImports(java.util.Map imports, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printNamespaceDeclarations
protected void printNamespaceDeclarations(java.util.Map namespaces, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
printExtensibilityElements
protected void printExtensibilityElements(java.lang.Class parentType, java.util.List extensibilityElements, Definition def, java.io.PrintWriter pw) throws WSDLException- Throws:
WSDLException
-
getDocument
public org.w3c.dom.Document getDocument(Definition wsdlDef) throws WSDLException
Return a document generated from the specified WSDL model.- Specified by:
getDocumentin interfaceWSDLWriter- Throws:
WSDLException
-
writeWSDL
public void writeWSDL(Definition wsdlDef, java.io.Writer sink) throws WSDLException
Write the specified WSDL definition to the specified Writer.- Specified by:
writeWSDLin interfaceWSDLWriter- Parameters:
wsdlDef- the WSDL definition to be written.sink- the Writer to write the xml to.- Throws:
WSDLException
-
writeWSDL
public void writeWSDL(Definition wsdlDef, java.io.OutputStream sink) throws WSDLException
Write the specified WSDL definition to the specified OutputStream.- Specified by:
writeWSDLin interfaceWSDLWriter- Parameters:
wsdlDef- the WSDL definition to be written.sink- the OutputStream to write the xml to.- Throws:
WSDLException
-
main
public static void main(java.lang.String[] argv) throws WSDLExceptionA 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.- Throws:
WSDLException
-
-