org.idoox.wasp.tools.java2wsdl
Interface Java2WSDL


public interface Java2WSDL

The Java2WSDL interface is an interface of for the WSDL generator tool.

See Java2WSDLFactory how to get an instance of the Java2WSDL and how to use it via API.

Here is the example how to use the Java2WSDL. The first example shows how to get the WSDL for the HelloService class as the instance of Definition class from the WSDL API.


     Java2WSDL java2wsdl = Java2WSDLFactory.newJava2WSDL();
     Definition definition = java2wsdl.generateDefinition(HelloService.class);

 
If you want to set the generated definition to the created endpoint you can use method ServiceEndpoint.setWSDL(javax.wsdl.Definition).
The second example shows how to generate the WSDL for the HelloService as a file. You have to set the output using the method setCompilerIO(org.idoox.wasp.tools.CompilerIO). You can either implement the interface CompilerIO by yourself or e.g. use the FileCompilerIO which contains the output destination directory to be specified in its constructor. The generated WSDL document(s) will be placed there.

     Java2WSDL java2wsdl = Java2WSDLFactory.newJava2WSDL();
     java2wsdl.setCompilerIO(new FileCompilerIO("/output"));
     java2wsdl.process(HelloService.class);

 

Since:
4.0
See Also:
Java2WSDL factory, WSDL definition, set the WSDL definition to service endpoint
Component:
Core

Nested Class Summary
static class Java2WSDL.ServiceDefinition
          Service definition.
 
Field Summary
static java.lang.String ATTACHMENT_TYPE_DIME
          generate attachments as DIME
static java.lang.String ATTACHMENT_TYPE_MIME
          generate attachments as MIME
static int BINDING_STYLE_DOCUMENT
          Binding style DOCUMENT.
static int BINDING_STYLE_RPC
          Binding style RPC.
static int BINDING_STYLE_WRAPPED
          Binding style WRAPPED.
static int MODE_ATTACHMENTS_AS_IN
          Map attachments as in.
static int MODE_ATTACHMENTS_AS_INOUT
          Map attachments as in/out.
static int MODE_INTERFACE_TO_REMOTE_REF
          Map interfaces to remote references.
static int MODE_INTERFACE_TO_STRUCTURE
          Map interfaces to structures.
static int MODE_TO_BINDING
          Generate partial WSDL including Binding but exluding Service.
static int MODE_TO_PORTTYPE
          Generate partial WSDL excluding Binding and Service.
static int MODE_TO_SERVICE
          Generate complete WSDL including Binding and Service.
static int PROTOCOL_HTTPGET
          HTTP GET binding
static int PROTOCOL_SOAP11
          SOAP 1.1 protocol binding
static int PROTOCOL_SOAP11_SOAP12
          SOAP1.1 and SOAP 1.2 protocol.
static int PROTOCOL_SOAP12
          SOAP 1.2 protocol binding
static int SOAP_USE_ENCODED
          Use SOAP-ENC encoding (SOAP spec.
static int SOAP_USE_LITERAL
          Use literal encoding.
 
Method Summary
 void addHeaders(Header[] header, Schema[] schemata)
          Adds headers which will be generated to WSDL.
 Definition generateDefinition(java.lang.Class clazz)
          Generates definition from the specified class.
 Definition[] generateDefinitions(java.lang.Class clazz)
          Deprecated. use generateDefinition(java.lang.Class) instead.
 Definition[] generateDefinitions(java.lang.Class[] classes)
          Generates definitions and returns an array of them.
 int getAttachmentsMappingMode()
          Returns attachments mapping mode.
 java.lang.String getAttachmentType()
          Get type of attachments to be generated - MIME or DIME.
 int getBindingStyle()
          Returns binding style.
 java.lang.ClassLoader getClassloader()
          Returns ClassLoader for both, classes and sources.
 java.lang.String getClasspath()
          Returns classpath for both, classes and sources.
 CompilerIO getCompilerIO()
          Returns the compilerIO.
 Processing getDDProcessing()
          Returns the DeploymentDescriptor processing
 java.util.Set getExcludedClasses()
          Returns a set of excluded classes.
 java.util.Set getExcludedMethods()
          Returns a set of methods to exclude from processing.
 java.util.Set getExtraTypes()
          Returns extra types to generate.
 java.util.Set getIncludedClasses()
          Returns a set of included classes.
 java.util.Set getIncludedMethods()
          Returns a set of methods to include to processing.
 java.util.Map getInheritanceMapping()
          Returns inheritance map of class -> superclass.
 int getInterfaceMappingMode()
          Returns mode of interface mapping.
 int getMode()
          Returns the processing mode (what parts of WSDL should be generated).
 java.util.Set getMultipartMethods()
          Returns a set of multipart methods.
 java.util.Map getNamespaceMapping()
          Returns map of targetNamespace -> filename.
 java.util.Set getOneWayMethods()
          Returns a set of methods which should be generated in one-way style.
 java.util.Map getPackageMapping()
          Returns map of package-name -> targetNamespace.
 int getProtocol()
          Returns protocol for generated WSDL.
 java.lang.String getSerializationID()
          Returns serialization ID to use.
 java.util.Map getServiceMapping()
          Returns map of service class name -> Service.
 int getSOAPEncoding()
          Returns type of SOAP encoding.
 boolean isAlwaysUseWsiSwaref()
          Get the current value of the property.
 boolean isIntrospectingSources()
          Returns if source introspection is enabled.
 boolean isJavaMappingExtension()
          Returns if java mapping extensibility elements are enabled.
 boolean isMultidimArrays()
          Returns type of generated arrays.
 boolean isOneWayMethod(java.lang.reflect.Method method)
          Sets this method is one-way method.
 boolean isReusingTypes()
          Returns if reusing types.
 boolean isRuntimeMode()
          Returns if runtime mode enabled.
 boolean isSortingFields()
          Returns if alphabetically sorting fields.
 boolean isUseWsiMimeAttachments()
          Gets the current setting of the property.
 boolean isVerbose()
          Returns if in verbose mode.
 void process(java.lang.Class clazz)
          Processes given class and generates WSDL files.
 void process(java.lang.Class[] classes)
          Processes given classes and generates WSDL files.
 void setAdditionalExceptions(java.util.Map map)
          Sets additional SOAP faults to create in the WSDL.
 void setAlwaysUseWsiSwaref(boolean newValue)
          Sets a new property value.
 void setAttachmentsMappingMode(int mode)
          Sets attachments mapping mode, default is MODE_ATTACHMENTS_AS_INOUT, the others are MODE_ATTACHMENTS_AS_IN.
 void setAttachmentType(java.lang.String type)
          Set type of attachments to be generated - MIME or DIME.
 void setBindingStyle(int bindingStyle)
          Sets the binding style.
 void setClassloader(java.lang.ClassLoader classLoader)
          Sets ClassLoader for both, classes and sources.
 void setClasspath(java.lang.String classpath)
          Sets classpath for both, classes and sources.
 void setCompilerIO(CompilerIO compilerIO)
          Sets the compilerIO.
 void setDDProcessing(Processing processing)
          Sets the DeploymentDescriptor processing
 void setExtraTypes(java.util.Set extraTypes)
          Sets extra types to generate.
 void setInheritanceMapping(java.util.Map inheritanceMapping)
          Sets inheritance map of class -> superclass.
 void setInterfaceMappingMode(int mode)
          Sets mode of interface mapping, default is MODE_INTERFACE_TO_STRUCTURE, the other one is MODE_INTERFACE_TO_REMOTE_REF
 void setIntrospectingSources(boolean introspectSources)
          Enables/disables source introspection.
 void setJavaMappingExtension(boolean javaMappingExtension)
          Enables/disables java mapping extensibility elements.
 void setMappingSchemas(java.util.Set referencedSchemas, java.util.Set insertedSchemas)
          Sets XML Schemas / WSDLs to take its types as the base for compilation.
 void setMode(int mode)
          Sets the processing mode (what parts of WSDL should be generated).
 void setMultidimArrays(boolean multidimArrays)
          Enables/disables generating of multidimensional arrays.
 void setMultipartMethods(java.util.Set multipartMethods)
          Sets multipart methods.
 void setNamespaceMapping(java.util.Map namespaceFileNameMapping)
          Sets map of targetNamespace -> filename.
 void setOneWayMethod(java.lang.reflect.Method method, boolean isOneWay)
          Sets if the specified method is one-way method.
 void setOneWayMethods(java.util.Set oneWayMethods)
          Sets a set of methods which should be generated in one-way style.
 void setPackageMapping(java.util.Map packageNamespaceMapping)
          Sets map of package-name -> targetNamespace.
 void setProtocol(int protocol)
          Sets protocol protocol binding for generated WSDL.
 void setReusingTypes(boolean reuseTypes)
          Enables/disables types reusing.
 void setRuntimeMode(java.lang.String endpointURI)
          UNDOCUMENTED.
 void setSerializationID(java.lang.String serializationID)
          Sets serialization ID to use.
 void setServiceMapping(java.util.Map serviceMapping)
          Sets map of service class name -> Service.
 void setSOAPEncoding(int soapEncoding)
          Sets type of SOAP encoding.
 void setSortingFields(boolean sortingFields)
          Enables/disables alphabetically sorting of fields.
 void setUseNillable(boolean b)
          Sets whether attribute nillable='true' or attributes minOccurs='0' maxOccurs='1' should be generated into XML schema for Java reference data types.
 void setUseWsiMimeAttachments(boolean newValue)
          Sets a new property value.
 void setVerbose(boolean verbose)
          Sets verbose output is to be printed.
 void setVerbose(int length)
          Enables verbose mode and sets output message max length.
 boolean testClassInclusion(java.lang.String className)
          Tests class processing inclusion.
 boolean testMethodInclusion(java.lang.String methodSignature)
          Tests method processing inclusion.
 

Field Detail

MODE_TO_SERVICE

public static final int MODE_TO_SERVICE
Generate complete WSDL including Binding and Service.

See Also:
Constant Field Values

MODE_TO_BINDING

public static final int MODE_TO_BINDING
Generate partial WSDL including Binding but exluding Service.

See Also:
Constant Field Values

MODE_TO_PORTTYPE

public static final int MODE_TO_PORTTYPE
Generate partial WSDL excluding Binding and Service.

See Also:
Constant Field Values

BINDING_STYLE_RPC

public static final int BINDING_STYLE_RPC
Binding style RPC.

See Also:
setBindingStyle(int), Constant Field Values

BINDING_STYLE_DOCUMENT

public static final int BINDING_STYLE_DOCUMENT
Binding style DOCUMENT.

See Also:
setBindingStyle(int), Constant Field Values

BINDING_STYLE_WRAPPED

public static final int BINDING_STYLE_WRAPPED
Binding style WRAPPED. The WRAPPED binding style is the BINDING_STYLE_DOCUMENT style with the "wrapped" approach to the operation parameters. All parameters of the operation are "wrapped" into the one wrapping element, so the message has only one part.
This is required by the WS-I basic profile.
Please note, WRAPPED style should be used only with "literal" encoding SOAP_USE_LITERAL (using method setSOAPEncoding(int)).

See Also:
setBindingStyle(int), Constant Field Values

SOAP_USE_ENCODED

public static final int SOAP_USE_ENCODED
Use SOAP-ENC encoding (SOAP spec. Sec.5 Encoding).

See Also:
setSOAPEncoding(int), Constant Field Values

SOAP_USE_LITERAL

public static final int SOAP_USE_LITERAL
Use literal encoding.

See Also:
setSOAPEncoding(int), Constant Field Values

MODE_INTERFACE_TO_STRUCTURE

public static final int MODE_INTERFACE_TO_STRUCTURE
Map interfaces to structures.

See Also:
Constant Field Values

MODE_INTERFACE_TO_REMOTE_REF

public static final int MODE_INTERFACE_TO_REMOTE_REF
Map interfaces to remote references.

See Also:
Constant Field Values

MODE_ATTACHMENTS_AS_INOUT

public static final int MODE_ATTACHMENTS_AS_INOUT
Map attachments as in/out.

See Also:
Constant Field Values

MODE_ATTACHMENTS_AS_IN

public static final int MODE_ATTACHMENTS_AS_IN
Map attachments as in.

See Also:
Constant Field Values

PROTOCOL_SOAP11

public static final int PROTOCOL_SOAP11
SOAP 1.1 protocol binding

See Also:
setProtocol(int), Constant Field Values

PROTOCOL_SOAP12

public static final int PROTOCOL_SOAP12
SOAP 1.2 protocol binding

See Also:
setProtocol(int), Constant Field Values

PROTOCOL_HTTPGET

public static final int PROTOCOL_HTTPGET
HTTP GET binding

See Also:
setProtocol(int), Constant Field Values

PROTOCOL_SOAP11_SOAP12

public static final int PROTOCOL_SOAP11_SOAP12
SOAP1.1 and SOAP 1.2 protocol.

See Also:
setProtocol(int), Constant Field Values

ATTACHMENT_TYPE_DIME

public static final java.lang.String ATTACHMENT_TYPE_DIME
generate attachments as DIME

See Also:
Constant Field Values

ATTACHMENT_TYPE_MIME

public static final java.lang.String ATTACHMENT_TYPE_MIME
generate attachments as MIME

See Also:
Constant Field Values
Method Detail

process

public void process(java.lang.Class clazz)
Processes given class and generates WSDL files.

Note: Before using this method you should set all the properties, mainly CompilerIO.

Parameters:
clazz - class to process

process

public void process(java.lang.Class[] classes)
Processes given classes and generates WSDL files.

Note: Before using this method you should set all the properties, mainly CompilerIO.

Parameters:
classes - classes to process

generateDefinition

public Definition generateDefinition(java.lang.Class clazz)
Generates definition from the specified class. For this method you don't need to call setCompilerIO(org.idoox.wasp.tools.CompilerIO).

Parameters:
clazz - class to process
Returns:
created definition

generateDefinitions

public Definition[] generateDefinitions(java.lang.Class clazz)
Deprecated. use generateDefinition(java.lang.Class) instead.

Generates definitions and returns an array of them. For this method you don't need to set CompilerIO.

Parameters:
clazz - class to process
Returns:
an array of created definitions

generateDefinitions

public Definition[] generateDefinitions(java.lang.Class[] classes)
Generates definitions and returns an array of them. For this method you don't need to set CompilerIO.

Parameters:
classes - classes to process
Returns:
an array of created definitions

setCompilerIO

public void setCompilerIO(CompilerIO compilerIO)
Sets the compilerIO. The compilerIO writes out the output of the compilation process. You can either implement the CompilerIO or use e.g. the FileCompilerIO.

Note: CompilerIO must be set explicitely to use process(java.lang.Class) methods.

Parameters:
compilerIO - compiler I/O helper

getCompilerIO

public CompilerIO getCompilerIO()
Returns the compilerIO.

Returns:
compiler I/O helper

getInterfaceMappingMode

public int getInterfaceMappingMode()
Returns mode of interface mapping.

Returns:
mode of interface mapping

setInterfaceMappingMode

public void setInterfaceMappingMode(int mode)
Sets mode of interface mapping, default is MODE_INTERFACE_TO_STRUCTURE, the other one is MODE_INTERFACE_TO_REMOTE_REF

Parameters:
mode - mode of interface mapping

getAttachmentsMappingMode

public int getAttachmentsMappingMode()
Returns attachments mapping mode.

Returns:
mode of attachments mapping

setAttachmentsMappingMode

public void setAttachmentsMappingMode(int mode)
Sets attachments mapping mode, default is MODE_ATTACHMENTS_AS_INOUT, the others are MODE_ATTACHMENTS_AS_IN.

Parameters:
mode - mode of attachments mapping

getPackageMapping

public java.util.Map getPackageMapping()
Returns map of package-name -> targetNamespace.

Returns:
map of package-name -> targetNamespace

setPackageMapping

public void setPackageMapping(java.util.Map packageNamespaceMapping)
Sets map of package-name -> targetNamespace.

Parameters:
packageNamespaceMapping - map of package-name -> targetNamespace

getNamespaceMapping

public java.util.Map getNamespaceMapping()
Returns map of targetNamespace -> filename.

Returns:
map of targetNamespace -> filename

setNamespaceMapping

public void setNamespaceMapping(java.util.Map namespaceFileNameMapping)
Sets map of targetNamespace -> filename.

Parameters:
namespaceFileNameMapping - map of targetNamespace -> filename

getServiceMapping

public java.util.Map getServiceMapping()
Returns map of service class name -> Service.

Returns:
map of service class name -> Service

setServiceMapping

public void setServiceMapping(java.util.Map serviceMapping)
Sets map of service class name -> Service.

Each key in the map must be a String (Service class name), each value in the map must be a Java2WSDL.ServiceDefinition.

Parameters:
serviceMapping - map of service class name -> Service

setMode

public void setMode(int mode)
Sets the processing mode (what parts of WSDL should be generated).

Parameters:
mode - the processing mode (default is MODE_TO_SERVICE, others are MODE_TO_BINDING, MODE_TO_PORTTYPE).

getMode

public int getMode()
Returns the processing mode (what parts of WSDL should be generated).

Returns:
the processing mode

getExcludedClasses

public java.util.Set getExcludedClasses()
Returns a set of excluded classes. Each entry is type of String representing full class name (e.g. "java.lang.String") or package name(e.g. "java.lang.*"). Changes of returned map causes immediate change of Java2Schema state.

Returns:
set of excluded classes

getIncludedClasses

public java.util.Set getIncludedClasses()
Returns a set of included classes. Each entry is type of String representing full class name. Changes of returned map causes immediate change of Java2Schema state.

Returns:
set of included classes

getExcludedMethods

public java.util.Set getExcludedMethods()
Returns a set of methods to exclude from processing. Each entry is type of String representing method in <package>.<class>.<signature> style. Changes of returned map causes immediate change of Java2Schema state.

Returns:
a set of methods to exclude from processing

getIncludedMethods

public java.util.Set getIncludedMethods()
Returns a set of methods to include to processing. Each entry is type of String representing method in <package>.<class>.<signature> style. Changes of returned map causes immediate change of Java2Schema state.

Returns:
a set of methods to include to processing

setMappingSchemas

public void setMappingSchemas(java.util.Set referencedSchemas,
                              java.util.Set insertedSchemas)
Sets XML Schemas / WSDLs to take its types as the base for compilation. Given files will be referenced by or will be directly inserted into target WSDL.

Parameters:
referencedSchemas - relative or absolute URLs of schema files (stored as String); these schemas will be referenced by element
insertedSchemas - relative or absolute URLs of schema files (stored as String); these schemas will be directly included

testClassInclusion

public boolean testClassInclusion(java.lang.String className)
Tests class processing inclusion. Name of class must be in . style. Changes of returned map causes immediate change of Java2Schema state.

Parameters:
className - name of class to test
Returns:
true if class should be processed, false otherwise

testMethodInclusion

public boolean testMethodInclusion(java.lang.String methodSignature)
Tests method processing inclusion. Name must represent method in .. style. Changes of returned map causes immediate change of Java2Schema state.

Parameters:
methodSignature - signature of method to test
Returns:
true is method should be processed, false otherwise

getOneWayMethods

public java.util.Set getOneWayMethods()
Returns a set of methods which should be generated in one-way style. Each entry is type of String representing method in .. style.

Returns:
a set of methods which should be generated in one-way style

setOneWayMethods

public void setOneWayMethods(java.util.Set oneWayMethods)
Sets a set of methods which should be generated in one-way style. Each entry is type of String representing method in .. style.

Parameters:
oneWayMethods - a set of methods which should be generated in one-way style

setOneWayMethod

public void setOneWayMethod(java.lang.reflect.Method method,
                            boolean isOneWay)
Sets if the specified method is one-way method.

Parameters:
method - selected method
isOneWay - true if should be one-way, false if not

isOneWayMethod

public boolean isOneWayMethod(java.lang.reflect.Method method)
Sets this method is one-way method.

Parameters:
method - selected method
Returns:
whether selected method is one-way

getExtraTypes

public java.util.Set getExtraTypes()
Returns extra types to generate. Each entry is type of Class.

Returns:
a set of extra types to generate

setExtraTypes

public void setExtraTypes(java.util.Set extraTypes)
Sets extra types to generate. Each entry must be type of Class.

Parameters:
extraTypes - a set of extra types to generate

isJavaMappingExtension

public boolean isJavaMappingExtension()
Returns if java mapping extensibility elements are enabled.

Returns:
true if java mapping extensibility elements are enabled.

setJavaMappingExtension

public void setJavaMappingExtension(boolean javaMappingExtension)
Enables/disables java mapping extensibility elements.

Parameters:
javaMappingExtension -

setVerbose

public void setVerbose(boolean verbose)
Sets verbose output is to be printed.

Parameters:
verbose - true if verbose comments are to be printed

setVerbose

public void setVerbose(int length)
Enables verbose mode and sets output message max length.

Parameters:
length - max length of output message, 0 means default length

isVerbose

public boolean isVerbose()
Returns if in verbose mode.

Returns:
true if being verbose, false otherwise

isSortingFields

public boolean isSortingFields()
Returns if alphabetically sorting fields.

Returns:
true if fields are alphabetically sorted

setSortingFields

public void setSortingFields(boolean sortingFields)
Enables/disables alphabetically sorting of fields.

Parameters:
sortingFields - if set to true fields will be sorted

getInheritanceMapping

public java.util.Map getInheritanceMapping()
Returns inheritance map of class -> superclass. The key is the String name of the class, the value is the String name of the superclass.

Returns:
inheritance map

setInheritanceMapping

public void setInheritanceMapping(java.util.Map inheritanceMapping)
Sets inheritance map of class -> superclass. The key is the String name of the class, the value is the String name of the superclass.

Parameters:
inheritanceMapping - of class -> superclass

getClasspath

public java.lang.String getClasspath()
Returns classpath for both, classes and sources.

Returns:
classpath

setClasspath

public void setClasspath(java.lang.String classpath)
Sets classpath for both, classes and sources.

Parameters:
classpath - classpath to set

getClassloader

public java.lang.ClassLoader getClassloader()
Returns ClassLoader for both, classes and sources.

Returns:
classLoader

setClassloader

public void setClassloader(java.lang.ClassLoader classLoader)
Sets ClassLoader for both, classes and sources.

Parameters:
classLoader - classLoader to set

getMultipartMethods

public java.util.Set getMultipartMethods()
Returns a set of multipart methods. Each entry is String representing method signature followed by direction tag. These tags can be + (in), - (out), +- (inout). Default is "inout" direction.

Returns:
a set of multipart methods

setMultipartMethods

public void setMultipartMethods(java.util.Set multipartMethods)
Sets multipart methods. Each entry is String representing method signature followed by direction tag. These tags can be + (in), - (out), +- (inout). Default is "inout" direction.

Parameters:
multipartMethods - a set of multipart methods

isReusingTypes

public boolean isReusingTypes()
Returns if reusing types. Default is disabled.

Returns:
true if reusing types enabled, false otherwise

setReusingTypes

public void setReusingTypes(boolean reuseTypes)
Enables/disables types reusing. If reusing types is enabled, all schema types will be in separated WSDL. This WSDL will be imported by each definition. Default is disabled.

Parameters:
reuseTypes - if set to true types reusing will be enabled

isRuntimeMode

public boolean isRuntimeMode()
Returns if runtime mode enabled.

Returns:
true if runtime mode enabled

setRuntimeMode

public void setRuntimeMode(java.lang.String endpointURI)
UNDOCUMENTED.


getSerializationID

public java.lang.String getSerializationID()
Returns serialization ID to use. It is null, by default.

Returns:
serialization ID to use

setSerializationID

public void setSerializationID(java.lang.String serializationID)
Sets serialization ID to use. It is null, by default.

Parameters:
serializationID - serialization ID to use

isIntrospectingSources

public boolean isIntrospectingSources()
Returns if source introspection is enabled.

Returns:
true if source instrospection is enabled, false otherwise

setIntrospectingSources

public void setIntrospectingSources(boolean introspectSources)
Enables/disables source introspection.

Parameters:
introspectSources - if set to true sources will be introspected

getBindingStyle

public int getBindingStyle()
Returns binding style.

Returns:
binding style - one of BINDING_STYLE_DOCUMENT, BINDING_STYLE_WRAPPED or BINDING_STYLE_RPC.

setBindingStyle

public void setBindingStyle(int bindingStyle)
Sets the binding style. The style can be either BINDING_STYLE_DOCUMENT, BINDING_STYLE_WRAPPED or BINDING_STYLE_RPC. If not set, the default value is used. The default values can be found in the WSO2 SOA Enablement Server configuration file (typically WASP_HOME/conf/serverconf.xml or WASP_HOME/conf/clientconf.xml), section "preferences".

Parameters:
bindingStyle - type of binding style - one of BINDING_STYLE_DOCUMENT, BINDING_STYLE_WRAPPED or BINDING_STYLE_RPC.

getSOAPEncoding

public int getSOAPEncoding()
Returns type of SOAP encoding.

Returns:
returns SOAP_USE_LITERAL or SOAP_USE_ENCODED.

setSOAPEncoding

public void setSOAPEncoding(int soapEncoding)
Sets type of SOAP encoding. Type can be either SOAP_USE_LITERAL or SOAP_USE_ENCODED. If not set, the default value is used. The default values can be found in the WSO2 SOA Enablement Server configuration file (typically WASP_HOME/conf/serverconf.xml or WASP_HOME/conf/clientconf.xml), section "preferences".

Parameters:
soapEncoding - type of SOAP encoding

isMultidimArrays

public boolean isMultidimArrays()
Returns type of generated arrays.

Returns:
returns true if multidim arrays are allowed, false otherwise

setMultidimArrays

public void setMultidimArrays(boolean multidimArrays)
Enables/disables generating of multidimensional arrays.

Parameters:
multidimArrays - set to true if multidim arrays are allowed

getProtocol

public int getProtocol()
Returns protocol for generated WSDL.

Returns:
protocol number - PROTOCOL_SOAP11, PROTOCOL_SOAP12, PROTOCOL_HTTPGET or their combination (logical OR)

setProtocol

public void setProtocol(int protocol)
Sets protocol protocol binding for generated WSDL. The protocol can be PROTOCOL_SOAP11, PROTOCOL_SOAP12, PROTOCOL_HTTPGET or you can use logical OR operator to specify more than one protocol (e.g. Java2WSDL.PROTOCOL_SOAP11 | Java2WSDL.PROTOCOL_HTTPGET). If not set, the default value is used. The default values can be found in the WSO2 SOA Enablement Server configuration file (typically WASP_HOME/conf/serverconf.xml or WASP_HOME/conf/clientconf.xml), section "preferences".

Parameters:
protocol - constant representing protocol or combination of protocols

addHeaders

public void addHeaders(Header[] header,
                       Schema[] schemata)
Adds headers which will be generated to WSDL.

Parameters:
header -
schemata -

setAttachmentType

public void setAttachmentType(java.lang.String type)
Set type of attachments to be generated - MIME or DIME.

Parameters:
type - constants ATTACHMENT_TYPE_DIME, ATTACHMENT_TYPE_MIME

getAttachmentType

public java.lang.String getAttachmentType()
Get type of attachments to be generated - MIME or DIME.

Returns:
one of constants ATTACHMENT_TYPE_DIME, ATTACHMENT_TYPE_MIME

setDDProcessing

public void setDDProcessing(Processing processing)
Sets the DeploymentDescriptor processing

Parameters:
processing - DeploymentDescriptor processing

getDDProcessing

public Processing getDDProcessing()
Returns the DeploymentDescriptor processing

Returns:
the DeploymentDescriptor processing

setUseNillable

public void setUseNillable(boolean b)
Sets whether attribute nillable='true' or attributes minOccurs='0' maxOccurs='1' should be generated into XML schema for Java reference data types. If not set, default value will be used - see Java2Schema.isUseNillable().

Parameters:
b - use true to generate with attribute nillable='true', use false to generate with attributes minOccurs='0' maxOccurs='1',
See Also:
Java2Schema.setUseNillable(boolean)

setAdditionalExceptions

public void setAdditionalExceptions(java.util.Map map)
Sets additional SOAP faults to create in the WSDL. Effect is the same if the exception is added to the java throws clause of respective method. See option --add-fault in product documentation.

Parameters:
map - a null or map with String keys and values Set of String; key is representation of method in format "qualifiedClass.methodName(signature)", where the signature including parenthesis is optional; strings in value are fully qualified names of java exceptions
Throws:
java.lang.IllegalArgumentException - if any class could not be found or does not contain the specified method or the method is provided without signature and is ambiguous

isUseWsiMimeAttachments

public boolean isUseWsiMimeAttachments()
Gets the current setting of the property.

If set, the created WSDL will be WS-I Attachment Profile 1.0 compliant (if the classes use any attachments). Otherwise SSJ 5.5 compliant WSDL is created. Default is derived from wsiCompliant value in clientconf.xml.

Returns:
the current property value

setUseWsiMimeAttachments

public void setUseWsiMimeAttachments(boolean newValue)
Sets a new property value.

Parameters:
newValue - a new value of the property
See Also:
isUseWsiMimeAttachments()

isAlwaysUseWsiSwaref

public boolean isAlwaysUseWsiSwaref()
Get the current value of the property.

Only effective if isUseWsiMimeAttachments() is true. In such case all attachments are represented as content of body with XML Schema type swaRef. Default value is false meaning that Java2WSDL will use explicit MIME part not referenced from body if possible.

Returns:
the current property value

setAlwaysUseWsiSwaref

public void setAlwaysUseWsiSwaref(boolean newValue)
Sets a new property value.

Parameters:
newValue - a new value of the property
See Also:
isAlwaysUseWsiSwaref()