org.apache.axis.wsdl.fromJava
public class Emitter extends Object
Field Summary | |
---|---|
protected static Log | log Field log |
static int | MODE_ALL Field MODE_ALL |
static int | MODE_DOCUMENT DEPRECATED - Indicates style=document use=literal |
static int | MODE_DOC_WRAPPED DEPRECATED - Indicates style=wrapped use=literal |
static int | MODE_IMPLEMENTATION Field MODE_IMPLEMENTATION |
static int | MODE_INTERFACE Field MODE_INTERFACE |
static int | MODE_RPC DEPRECATED - Indicates style=rpc use=encoded |
protected static TypeMapping | standardTypes Field standardTypes |
protected Types | types Field types |
Constructor Summary | |
---|---|
Emitter()
Construct Emitter.
|
Method Summary | |
---|---|
protected Definition | createDefinition()
Build a Definition from the input wsdl file or create
a new Definition
|
protected Element | createDocumentationElement(String documentation)
Create a documentation element
|
protected QName | createMessageName(Definition def, String methodName)
Method createMessageName
|
protected Types | createTypes(Definition def)
Build a Types object and load the input wsdl types
|
void | emit(String filename1, String filename2)
Generates WSDL documents for a given Class
|
void | emit(String filename)
Generates a complete WSDL document for a given Class
|
Document | emit(int mode)
Generates a WSDL document for a given Class .
|
void | emit(String filename, int mode)
Generates a WSDL document for a given Class .
|
String | emitToString(int mode)
Generates a String containing the WSDL for a given Class .
|
Vector | getAllowedMethods()
Returns a vector of methods to export
|
String | getBindingName()
Returns the String representation of the binding name
|
Class | getCls()
Returns the Class to export
|
TypeMapping | getDefaultTypeMapping()
Returns the defaultTypeMapping used by the service |
String | getDescription()
Returns the service description
|
Vector | getDisallowedMethods()
Return list of methods that should not be exported
|
Class[] | getExtraClasses()
Return the list of extra classes that the emitter will produce WSDL for.
|
Class | getImplCls()
Returns the implementation Class if set
|
String | getImplNamespace()
Returns the implementation namespace
|
Definition | getImplWSDL()
Get implementation WSDL Definition for the
current configuration parameters
|
String | getImportUrl()
Returns the String representation of the interface import location URL
|
String | getInputSchema() |
String | getInputWSDL()
Get the name of the input WSDL
|
String | getIntfNamespace()
Returns the interface namespace
|
Definition | getIntfWSDL()
Get a interface WSDL Definition for the
current configuration parameters
|
String | getLocationUrl()
Returns the String representation of the service endpoint URL
|
int | getMode()
getMode (gets the mode based on the style setting)
|
Map | getNamespaceMap()
get the packagename to namespace map
|
String | getPortTypeName()
Returns the String representation of the portType name
|
HashMap | getQName2ClassMap()
Return the type qname to java type mapping |
protected QName | getRequestQName(OperationDesc oper)
Method getRequestQName
|
protected QName | getResponseQName(OperationDesc oper)
Method getResponseQName
|
ServiceDesc | getServiceDesc()
Method getServiceDesc
|
String | getServiceElementName()
Returns the String representation of the service element name
|
String | getServicePortName()
Returns the String representation of the service port name
|
String | getSoapAction()
Returns the soapAction option value
|
ArrayList | getStopClasses()
Return the list of classes which stop inhertance searches
|
Style | getStyle()
getStyle
|
String | getTargetService()
Returns the target service name
|
TypeMapping | getTypeMapping()
Returns the TypeMapping used by the service
|
Use | getUse()
getUse
|
boolean | getUseInheritedMethods()
Indicates if the emitter will search classes for inherited methods
|
String | getVersionMessage()
Return the version message |
Definition | getWSDL()
Get a Full WSDL Definition for the current
configuration parameters
|
protected void | init(int mode)
Invoked prior to building a definition to ensure parms
and data are set up.
|
protected void | prettyDocumentToFile(Document doc, String filename)
Write a prettified document to a file.
|
void | setAllowedMethods(String text)
Add a list of methods to export
|
void | setAllowedMethods(Vector allowedMethods)
Add a Vector of methods to export
|
void | setBindingName(String bindingName)
Set the String representation of the binding name
|
void | setCls(Class cls)
Sets the Class to export
|
void | setCls(String className)
Sets the Class to export
|
void | setClsSmart(Class cls, String location)
Sets the Class to export.
|
void | setDefaultTypeMapping(TypeMapping tm)
Sets the defaultTypeMapping used by the service |
void | setDescription(String description)
Set the service description
|
void | setDisallowedMethods(Vector disallowedMethods)
Add a list of methods NOT to export
|
void | setDisallowedMethods(String text)
Add a list of methods NOT to export
|
void | setEmitAllTypes(boolean emitAllTypes) |
void | setExtraClasses(Class[] extraClasses)
Provide a list of classes which the emitter will produce WSDL
type definitions for.
|
void | setExtraClasses(String text)
Provide a comma or space seperated list of classes which
the emitter will produce WSDL type definitions for.
|
void | setImplCls(Class implCls)
Sets the implementation Class
|
void | setImplCls(String className)
Sets the implementation Class
|
void | setImplNamespace(String ns)
Set the implementation namespace
|
void | setImportUrl(String importUrl)
Set the String representation of the interface location URL
for importing
|
void | setInputSchema(String inputSchema)
Set the name of the input schema
|
void | setInputWSDL(String inputWSDL)
Set the name of the input WSDL
|
void | setIntfNamespace(String ns)
Set the interface namespace
|
void | setLocationUrl(String locationUrl)
Set the String representation of the service endpoint URL
|
void | setMode(int mode)
setMode (sets style and use)
|
void | setNamespaceMap(Map map)
Set the packagename to namespace map with the given map
|
void | setPortTypeName(String portTypeName)
Set the String representation of the portType name
|
void | setServiceDesc(ServiceDesc serviceDesc)
Method setServiceDesc
|
void | setServiceElementName(String serviceElementName)
Set the String representation of the service element name
|
void | setServicePortName(String servicePortName)
Set the String representation of the service port name
|
void | setSoapAction(String value)
Sets the soapAction option value
|
void | setStopClasses(ArrayList stopClasses)
Adds a list of classes (fully qualified) that will stop the traversal
of the inheritance tree if encounter in method or complex type generation
|
void | setStopClasses(String text)
Add a list of classes (fully qualified) that will stop the traversal
of the inheritance tree if encounter in method or complex type generation
|
void | setStyle(String value)
setStyle
|
void | setStyle(Style value)
setStyle
|
void | setTargetService(String targetService)
Set the target service name
|
void | setTypeMapping(TypeMapping tm)
Sets the TypeMapping used by the service
|
void | setTypeMappingRegistry(TypeMappingRegistry tmr)
Set the TypeMappingRegistry for this Emitter. |
void | setUse(String value)
setUse
|
void | setUse(Use value)
setUse
|
void | setUseInheritedMethods(boolean useInheritedMethods)
Turn on or off inherited method WSDL generation.
|
void | setVersionMessage(String versionMessage)
Set the version message that appears at the top of the WSDL
If not set, we use the default version message.
|
protected Binding | writeBinding(Definition def, boolean add)
Create the binding.
|
protected BindingOperation | writeBindingOperation(Definition def, Binding binding, Operation oper, OperationDesc desc)
Create a Binding Operation
|
protected void | writeDefinitions(Definition def, String tns)
Create the definition header information.
|
protected Message | writeFaultMessage(Definition def, FaultDesc exception)
Create a Fault Message
|
protected void | writeImport(Definition def, String tns, String loc)
Create and add an import
|
protected void | writeMessages(Definition def, Operation oper, OperationDesc desc, BindingOperation bindingOper)
Create a Message
|
protected BindingOperation | writeOperation(Definition def, Binding binding, OperationDesc desc)
Create a Operation
|
String | writePartToMessage(Definition def, Message msg, boolean request, ParameterDesc param)
Create a Part
|
protected void | writePortType(Definition def, Binding binding)
Create a PortType
|
protected Message | writeRequestMessage(Definition def, OperationDesc oper, BindingOperation bindop)
Create a Request Message
|
protected Message | writeResponseMessage(Definition def, OperationDesc desc, BindingOperation bindop)
Create a Response Message
|
protected void | writeService(Definition def, Binding binding)
Create the service.
|
protected ExtensibilityElement | writeSOAPBody(QName operQName)
Method writeSOAPBody
|
protected SOAPFault | writeSOAPFault(FaultDesc faultDesc)
Method writeSOAPFault
|
protected SOAPHeader | writeSOAPHeader(ParameterDesc p, QName messageQName, String partName)
Create a SOAPHeader element |
String | writeWrapperPart(Definition def, Message msg, OperationDesc oper, boolean request)
Write out the schema definition for a WRAPPED operation request or
response.
|
Returns: WSDL Definition
Throws: WSDLException SAXException IOException ParserConfigurationException
Parameters: documentation
Returns:
Parameters: def methodName
Returns:
Parameters: def Corresponding wsdl Definition
Returns: Types object
Throws: IOException WSDLException SAXException ParserConfigurationException
Class
Parameters: filename1 interface WSDL filename2 implementation WSDL
Throws: IOException WSDLException SAXException ParserConfigurationException
Class
Parameters: filename WSDL
Throws: IOException WSDLException SAXException ParserConfigurationException
Class
.
The WSDL generated is controlled by the mode parameter
mode 0: All
mode 1: Interface
mode 2: Implementation
Parameters: mode generation mode - all, interface, implementation
Returns: Document
Throws: IOException WSDLException SAXException ParserConfigurationException
Class
.
The WSDL generated is controlled by the mode parameter
mode 0: All
mode 1: Interface
mode 2: Implementation
Parameters: filename WSDL mode generation mode - all, interface, implementation
Throws: IOException WSDLException SAXException ParserConfigurationException
Class
.
The WSDL generated is controlled by the mode parameter
mode 0: All
mode 1: Interface
mode 2: Implementation
Parameters: mode generation mode - all, interface, implementation
Returns: String
Throws: IOException WSDLException SAXException ParserConfigurationException
Returns: a space separated list of methods to export
Returns: String representation of the binding name
Class
to export
Returns: the Class
to export
Deprecated: Use getTypeMappingRegistry instead
Returns thedefaultTypeMapping
used by the serviceReturns: the defaultTypeMapping
used by the service
Returns: service description String
Returns:
Returns:
Class
if set
Returns: the implementation Class or null
Returns: implementation target namespace
Definition
for the
current configuration parameters
Returns: WSDL Definition
Throws: IOException WSDLException SAXException ParserConfigurationException
Returns: String representation of the interface import location URL
Returns: the name of the input schema, or null
Returns: name of the input wsdl or null
Returns: interface target namespace
Definition
for the
current configuration parameters
Returns: WSDL Definition
Throws: IOException WSDLException SAXException ParserConfigurationException
Returns: String representation of the service endpoint URL
Deprecated: (use getStyle and getUse)
getMode (gets the mode based on the style setting)Returns: returns the mode (-1 if invalid)
Returns: Map
Returns: String representation of the portType name
Returns: mapping of type qname to its corresponding java type
Parameters: oper
Returns:
Parameters: oper
Returns:
Returns:
Returns: String representation of the service element name
Returns: String representation of the service port name
Returns: the String DEFAULT, NONE or OPERATION
Returns:
Returns: Style setting (Style.RPC, Style.DOCUMENT, Style.WRAPPED, etc.)
Returns: the target service name
TypeMapping
used by the service
Returns: the TypeMapping
used by the service
Returns: Use setting (Use.ENCODED, Use.LITERAL)
Returns:
Returns: message or null if emitter will use the default
Definition
for the current
configuration parameters
Returns: WSDL Definition
Throws: IOException WSDLException SAXException ParserConfigurationException
Parameters: mode
Parameters: doc the Document to write filename the name of the file to be written
Throws: IOException various file i/o exceptions
Parameters: text
Parameters: allowedMethods a vector of methods to export
Parameters: bindingName the String representation of the binding name
Class
to export
Parameters: cls the Class
to export
Class
to export
Parameters: className the name of the Class
to export
Throws: ClassNotFoundException
Class
to export.
Parameters: cls the Class
to export location
Deprecated: Use setTypeMappingRegistry instead
Sets thedefaultTypeMapping
used by the serviceParameters: tm the defaultTypeMapping
used by the service
Parameters: description service description String
Parameters: disallowedMethods vector of method name strings
Parameters: text space separated list of method names
Parameters: extraClasses
Parameters: text
Throws: ClassNotFoundException
Class
Parameters: implCls the Class
to export
Class
Parameters: className the name of the implementation Class
Parameters: ns implementation target namespace
Parameters: importUrl the String representation of the interface location URL for importing
Parameters: inputSchema the name of the input schema
Parameters: inputWSDL the name of the input WSDL
Parameters: ns interface target namespace
Parameters: locationUrl the String representation of the service endpoint URL
Deprecated: (use setStyle and setUse)
setMode (sets style and use)Parameters: mode
Parameters: map packagename/namespace Map
Parameters: portTypeName the String representation of the portType name
Parameters: serviceDesc
Parameters: serviceElementName the String representation of the service element name
Parameters: servicePortName the String representation of the service port name
Parameters: value must be DEFAULT, NONE, or OPERATION
Parameters: stopClasses vector of class name strings
Parameters: text space separated list of class names
Parameters: value String representing a style ("document", "rpc", "wrapped")
Note that the case of the string is not important. "document" and "DOCUMENT"
are both treated as document style.
If the value is not a know style, the default setting is used.
See org.apache.axis.constants.Style for a description of the interaction between
Style/Use
NOTE: If style is specified as "wrapped", use is set to literal.
Parameters: value Style setting
Parameters: targetService the target service name
TypeMapping
used by the service
Parameters: tm the TypeMapping
used by the service
Parameters: value String representing a use ("literal", "encoded") Note that the case of the string is not important. "literal" and "LITERAL" are both treated as literal use. If the value is not a know use, the default setting is used. See org.apache.axis.constants.Style for a description of the interaction between Style/Use
Parameters: value Use setting
Parameters: useInheritedMethods
Parameters: versionMessage the message to emit
Parameters: def Definition
add true if binding should be added to the def
Returns:
Parameters: def binding oper desc
Returns:
Parameters: def Definition
tns target namespace
Parameters: def exception (an ExceptionRep object)
Returns:
Throws: WSDLException AxisFault
Parameters: def Definition
tns target namespace loc target location
Parameters: def Definition, the WSDL definition oper Operation, the wsdl operation desc OperationDesc, the Operation Description bindingOper BindingOperation, corresponding Binding Operation
Throws: WSDLException AxisFault
Parameters: def binding desc
Returns:
Parameters: def msg request message is for a request param ParamRep object
Returns: The parameter name added or null
Throws: WSDLException AxisFault
Parameters: def binding
Throws: WSDLException AxisFault
Parameters: def oper
Returns:
Throws: WSDLException AxisFault
Parameters: def desc
Returns:
Throws: WSDLException AxisFault
Parameters: def binding
Parameters: operQName
Returns:
Parameters: faultDesc
Returns:
Parameters: def msg oper request
Returns: the name of the part the was written
Throws: AxisFault