|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.axis.wsdl.fromJava.Emitter
This class emits WSDL from Java classes. It is used by the ?WSDL Axis browser function and Java2WSDL commandline utility. See Java2WSDL and Java2WSDLFactory for more information.
Field Summary | |
static int |
MODE_ALL
|
static int |
MODE_DOC_WRAPPED
DEPRECATED - Indicates style=wrapped use=literal |
static int |
MODE_DOCUMENT
DEPRECATED - Indicates style=document use=literal |
static int |
MODE_IMPLEMENTATION
|
static int |
MODE_INTERFACE
|
static int |
MODE_RPC
DEPRECATED - Indicates style=rpc use=encoded |
protected static TypeMapping (src) |
standardTypes
|
protected Types (src) |
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 QName (src) |
createMessageName(Definition def,
java.lang.String methodName)
|
protected Types (src) |
createTypes(Definition def)
Build a Types object and load the input wsdl types |
org.w3c.dom.Document |
emit(int mode)
Generates a WSDL document for a given Class . |
void |
emit(java.lang.String filename)
Generates a complete WSDL document for a given Class |
void |
emit(java.lang.String filename,
int mode)
Generates a WSDL document for a given Class . |
void |
emit(java.lang.String filename1,
java.lang.String filename2)
Generates WSDL documents for a given Class |
java.lang.String |
emitToString(int mode)
Generates a String containing the WSDL for a given Class . |
java.util.Vector |
getAllowedMethods()
Returns a vector of methods to export |
java.lang.String |
getBindingName()
Returns the String representation of the binding name |
java.lang.Class |
getCls()
Returns the Class to export |
TypeMapping (src) |
getDefaultTypeMapping()
Returns the default TypeMapping used by the service |
java.lang.String |
getDescription()
Returns the service description |
java.util.Vector |
getDisallowedMethods()
Return list of methods that should not be exported |
java.lang.Class[] |
getExtraClasses()
Return the list of extra classes that the emitter will produce WSDL for. |
java.lang.Class |
getImplCls()
Returns the implementation Class if set |
java.lang.String |
getImplNamespace()
Returns the implementation namespace |
Definition |
getImplWSDL()
Get implementation WSDL Definition for the
current configuration parameters |
java.lang.String |
getImportUrl()
Returns the String representation of the interface import location URL |
java.lang.String |
getInputSchema()
|
java.lang.String |
getInputWSDL()
Get the name of the input WSDL |
java.lang.String |
getIntfNamespace()
Returns the interface namespace |
Definition |
getIntfWSDL()
Get a interface WSDL Definition for the
current configuration parameters |
java.lang.String |
getLocationUrl()
Returns the String representation of the service endpoint URL |
int |
getMode()
Deprecated. (use getStyle and getUse) |
java.util.Map |
getNamespaceMap()
get the packagename to namespace map |
java.lang.String |
getPortTypeName()
Returns the String representation of the portType name |
protected QName (src) |
getRequestQName(OperationDesc (src) oper)
|
protected QName (src) |
getResponseQName(OperationDesc (src) oper)
|
ServiceDesc (src) |
getServiceDesc()
|
java.lang.String |
getServiceElementName()
Returns the String representation of the service element name |
java.lang.String |
getServicePortName()
Returns the String representation of the service port name |
java.lang.String |
getSoapAction()
Returns the soapAction option value |
java.util.ArrayList |
getStopClasses()
Return the list of classes which stop inhertance searches |
Style (src) |
getStyle()
getStyle |
java.lang.String |
getTargetService()
Returns the target service name |
TypeMapping (src) |
getTypeMapping()
Returns the TypeMapping used by the service |
Use (src) |
getUse()
getUse |
boolean |
getUseInheritedMethods()
Indicates if the emitter will search classes for inherited methods |
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(org.w3c.dom.Document doc,
java.lang.String filename)
Write a prettified document to a file. |
void |
setAllowedMethods(java.lang.String text)
Add a list of methods to export |
void |
setAllowedMethods(java.util.Vector allowedMethods)
Add a Vector of methods to export |
void |
setBindingName(java.lang.String bindingName)
Set the String representation of the binding name |
void |
setCls(java.lang.Class cls)
Sets the Class to export |
void |
setCls(java.lang.String className)
Sets the Class to export |
void |
setClsSmart(java.lang.Class cls,
java.lang.String location)
Sets the Class to export. |
void |
setDefaultTypeMapping(TypeMapping (src) defaultTM)
Sets the default TypeMapping used by the service |
void |
setDescription(java.lang.String description)
Set the service description |
void |
setDisallowedMethods(java.lang.String text)
Add a list of methods NOT to export |
void |
setDisallowedMethods(java.util.Vector disallowedMethods)
Add a list of methods NOT to export |
void |
setExtraClasses(java.lang.Class[] extraClasses)
Provide a list of classes which the emitter will produce WSDL type definitions for. |
void |
setExtraClasses(java.lang.String text)
Provide a comma or space seperated list of classes which the emitter will produce WSDL type definitions for. |
void |
setImplCls(java.lang.Class implCls)
Sets the implementation Class |
void |
setImplCls(java.lang.String className)
Sets the implementation Class |
void |
setImplNamespace(java.lang.String ns)
Set the implementation namespace |
void |
setImportUrl(java.lang.String importUrl)
Set the String representation of the interface location URL for importing |
void |
setInputSchema(java.lang.String inputSchema)
Set the name of the input schema |
void |
setInputWSDL(java.lang.String inputWSDL)
Set the name of the input WSDL |
void |
setIntfNamespace(java.lang.String ns)
Set the interface namespace |
void |
setLocationUrl(java.lang.String locationUrl)
Set the String representation of the service endpoint URL |
void |
setMode(int mode)
Deprecated. (use setStyle and setUse) |
void |
setNamespaceMap(java.util.Map map)
Set the packagename to namespace map with the given map |
void |
setPortTypeName(java.lang.String portTypeName)
Set the String representation of the portType name |
void |
setServiceDesc(ServiceDesc (src) serviceDesc)
|
void |
setServiceElementName(java.lang.String serviceElementName)
Set the String representation of the service element name |
void |
setServicePortName(java.lang.String servicePortName)
Set the String representation of the service port name |
void |
setSoapAction(java.lang.String value)
Sets the soapAction option value |
void |
setStopClasses(java.util.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(java.lang.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(java.lang.String value)
setStyle |
void |
setStyle(Style (src) value)
setStyle |
void |
setTargetService(java.lang.String targetService)
Set the target service name |
void |
setTypeMapping(TypeMapping (src) tm)
Sets the TypeMapping used by the service |
void |
setUse(java.lang.String value)
setUse |
void |
setUse(Use (src) value)
setUse |
void |
setUseInheritedMethods(boolean useInheritedMethods)
Turn on or off inherited method WSDL generation. |
protected Binding |
writeBinding(Definition def,
boolean add)
Create the binding. |
protected BindingOperation |
writeBindingOperation(Definition def,
Binding binding,
Operation oper,
OperationDesc (src) desc)
Create a Binding Operation |
protected void |
writeDefinitions(Definition def,
java.lang.String tns)
Create the definition header information. |
protected Message |
writeFaultMessage(Definition def,
FaultDesc (src) exception)
Create a Fault Message |
protected void |
writeImport(Definition def,
java.lang.String tns,
java.lang.String loc)
Create and add an import |
protected void |
writeMessages(Definition def,
Operation oper,
OperationDesc (src) desc,
BindingOperation bindingOper)
Create a Message |
protected BindingOperation |
writeOperation(Definition def,
Binding binding,
OperationDesc (src) desc)
Create a Operation |
java.lang.String |
writePartToMessage(Definition def,
Message msg,
boolean request,
ParameterDesc (src) param)
Create a Part |
protected void |
writePortType(Definition def,
Binding binding)
Create a PortType |
protected Message |
writeRequestMessage(Definition def,
OperationDesc (src) oper)
Create a Request Message |
protected Message |
writeResponseMessage(Definition def,
OperationDesc (src) desc)
Create a Response Message |
protected void |
writeService(Definition def,
Binding binding)
Create the service. |
protected ExtensibilityElement |
writeSOAPBody(QName (src) operQName)
|
protected SOAPFault |
writeSOAPFault(FaultDesc (src) faultDesc)
|
void |
writeWrapperPart(Definition def,
Message msg,
OperationDesc (src) oper,
boolean request)
Write out the schema definition for a WRAPPED operation request or response. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MODE_ALL
public static final int MODE_INTERFACE
public static final int MODE_IMPLEMENTATION
protected Types (src) types
public static final int MODE_RPC
public static final int MODE_DOCUMENT
public static final int MODE_DOC_WRAPPED
protected static TypeMapping (src) standardTypes
Constructor Detail |
public Emitter()
Method Detail |
public void emit(java.lang.String filename1, java.lang.String filename2) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Class
filename1
- interface WSDLfilename2
- implementation WSDL
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void emit(java.lang.String filename) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Class
filename
- WSDL
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public org.w3c.dom.Document emit(int mode) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Class
.
The WSDL generated is controlled by the mode parameter
mode 0: All
mode 1: Interface
mode 2: Implementation
mode
- generation mode - all, interface, implementation
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public java.lang.String emitToString(int mode) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Class
.
The WSDL generated is controlled by the mode parameter
mode 0: All
mode 1: Interface
mode 2: Implementation
mode
- generation mode - all, interface, implementation
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void emit(java.lang.String filename, int mode) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Class
.
The WSDL generated is controlled by the mode parameter
mode 0: All
mode 1: Interface
mode 2: Implementation
filename
- WSDLmode
- generation mode - all, interface, implementation
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public Definition getWSDL() throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Definition
for the current
configuration parameters
Definition
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public Definition getIntfWSDL() throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Definition
for the
current configuration parameters
Definition
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public Definition getImplWSDL() throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Definition
for the
current configuration parameters
Definition
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
protected void init(int mode)
protected Definition createDefinition() throws WSDLException, org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
WSDLException
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
protected Types (src) createTypes(Definition def) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
def
- Corresponding wsdl Definition
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
protected void writeDefinitions(Definition def, java.lang.String tns)
def
- Definition
tns
- target namespaceprotected void writeImport(Definition def, java.lang.String tns, java.lang.String loc)
def
- Definition
tns
- target namespaceloc
- target locationprotected Binding writeBinding(Definition def, boolean add)
def
- Definition
add
- true if binding should be added to the defprotected void writeService(Definition def, Binding binding)
def
- binding
- protected void writePortType(Definition def, Binding binding) throws WSDLException, AxisFault (src)
def
- binding
-
WSDLException
AxisFault (src)
protected void writeMessages(Definition def, Operation oper, OperationDesc (src) desc, BindingOperation bindingOper) throws WSDLException, AxisFault (src)
def
- Definition, the WSDL definitionoper
- Operation, the wsdl operationdesc
- OperationDesc, the Operation DescriptionbindingOper
- BindingOperation, corresponding Binding Operation
WSDLException
AxisFault (src)
protected BindingOperation writeOperation(Definition def, Binding binding, OperationDesc (src) desc)
def
- binding
- protected BindingOperation writeBindingOperation(Definition def, Binding binding, Operation oper, OperationDesc (src) desc)
def
- binding
- oper
- protected ExtensibilityElement writeSOAPBody(QName (src) operQName)
protected SOAPFault writeSOAPFault(FaultDesc (src) faultDesc)
protected Message writeRequestMessage(Definition def, OperationDesc (src) oper) throws WSDLException, AxisFault (src)
def
-
WSDLException
AxisFault (src)
protected QName (src) getRequestQName(OperationDesc (src) oper)
protected QName (src) getResponseQName(OperationDesc (src) oper)
public void writeWrapperPart(Definition def, Message msg, OperationDesc (src) oper, boolean request) throws AxisFault (src)
oper
- request
-
AxisFault (src)
protected Message writeResponseMessage(Definition def, OperationDesc (src) desc) throws WSDLException, AxisFault (src)
def
-
WSDLException
AxisFault (src)
protected Message writeFaultMessage(Definition def, FaultDesc (src) exception) throws WSDLException, AxisFault (src)
def
- exception
- (an ExceptionRep object)
WSDLException
AxisFault (src)
public java.lang.String writePartToMessage(Definition def, Message msg, boolean request, ParameterDesc (src) param) throws WSDLException, AxisFault (src)
def
- msg
- request
- message is for a requestparam
- ParamRep object
WSDLException
AxisFault (src)
protected QName (src) createMessageName(Definition def, java.lang.String methodName)
protected void prettyDocumentToFile(org.w3c.dom.Document doc, java.lang.String filename) throws java.io.IOException
doc
- the Document to writefilename
- the name of the file to be written
java.io.IOException
- various file i/o exceptionspublic java.lang.Class getCls()
Class
to export
Class
to exportpublic void setCls(java.lang.Class cls)
Class
to export
cls
- the Class
to exportpublic void setClsSmart(java.lang.Class cls, java.lang.String location)
Class
to export.
cls
- the Class
to exportpublic void setCls(java.lang.String className) throws java.lang.ClassNotFoundException
Class
to export
className
- the name of the Class
to export
java.lang.ClassNotFoundException
public java.lang.Class getImplCls()
Class
if set
public void setImplCls(java.lang.Class implCls)
Class
implCls
- the Class
to exportpublic void setImplCls(java.lang.String className)
Class
className
- the name of the implementation Class
public java.lang.String getIntfNamespace()
public void setIntfNamespace(java.lang.String ns)
ns
- interface target namespacepublic java.lang.String getImplNamespace()
public void setImplNamespace(java.lang.String ns)
ns
- implementation target namespacepublic java.util.Vector getAllowedMethods()
public void setAllowedMethods(java.lang.String text)
public void setAllowedMethods(java.util.Vector allowedMethods)
allowedMethods
- a vector of methods to exportpublic boolean getUseInheritedMethods()
public void setUseInheritedMethods(boolean useInheritedMethods)
public void setDisallowedMethods(java.util.Vector disallowedMethods)
disallowedMethods
- vector of method name stringspublic void setDisallowedMethods(java.lang.String text)
text
- space separated list of method namespublic java.util.Vector getDisallowedMethods()
public void setStopClasses(java.util.ArrayList stopClasses)
stopClasses
- vector of class name stringspublic void setStopClasses(java.lang.String text)
text
- space separated list of class namespublic java.util.ArrayList getStopClasses()
public java.util.Map getNamespaceMap()
Map
public void setNamespaceMap(java.util.Map map)
map
- packagename/namespace Map
public java.lang.String getInputWSDL()
public void setInputWSDL(java.lang.String inputWSDL)
inputWSDL
- the name of the input WSDLpublic java.lang.String getInputSchema()
public void setInputSchema(java.lang.String inputSchema)
inputSchema
- the name of the input schemapublic java.lang.String getLocationUrl()
public void setLocationUrl(java.lang.String locationUrl)
locationUrl
- the String representation of the service endpoint URLpublic java.lang.String getImportUrl()
public void setImportUrl(java.lang.String importUrl)
importUrl
- the String representation of the interface
location URL for importingpublic java.lang.String getServicePortName()
public void setServicePortName(java.lang.String servicePortName)
servicePortName
- the String representation of the service port namepublic java.lang.String getServiceElementName()
public void setServiceElementName(java.lang.String serviceElementName)
serviceElementName
- the String representation of the service element namepublic java.lang.String getPortTypeName()
public void setPortTypeName(java.lang.String portTypeName)
portTypeName
- the String representation of the portType namepublic java.lang.String getBindingName()
public void setBindingName(java.lang.String bindingName)
bindingName
- the String representation of the binding namepublic java.lang.String getTargetService()
public void setTargetService(java.lang.String targetService)
targetService
- the target service namepublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- service description Stringpublic java.lang.String getSoapAction()
public void setSoapAction(java.lang.String value)
value
- must be DEFAULT, NONE, or OPERATIONpublic TypeMapping (src) getTypeMapping()
TypeMapping
used by the service
TypeMapping
used by the servicepublic void setTypeMapping(TypeMapping (src) tm)
TypeMapping
used by the service
tm
- the TypeMapping
used by the servicepublic TypeMapping (src) getDefaultTypeMapping()
TypeMapping
used by the service
TypeMapping
used by the servicepublic void setDefaultTypeMapping(TypeMapping (src) defaultTM)
TypeMapping
used by the service
defaultTM
- the default TypeMapping
used by the servicepublic Style (src) getStyle()
public void setStyle(java.lang.String value)
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.jboss.axis.enums.Style for a description of the interaction between
Style/Use
public void setStyle(Style (src) value)
value
- Style settingpublic Use (src) getUse()
public void setUse(java.lang.String value)
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.jboss.axis.enums.Style for a description of the interaction between
Style/Usepublic void setUse(Use (src) value)
value
- Use settingpublic void setMode(int mode)
public int getMode()
public ServiceDesc (src) getServiceDesc()
public void setServiceDesc(ServiceDesc (src) serviceDesc)
public java.lang.Class[] getExtraClasses()
public void setExtraClasses(java.lang.Class[] extraClasses)
public void setExtraClasses(java.lang.String text) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |