addPackageName
public static String addPackageName(String className,
String newPkg)
Add package to name
className
- full name of the class.newPkg
- name of the package to append
- String name with package name added
addUnderscore
public static String addUnderscore(String name)
Prepend an underscore to the name
capitalizeFirstChar
public static String capitalizeFirstChar(String name)
Capitalize the first character of the name.
fileExists
public static boolean fileExists(String name,
String namespace,
Namespaces namespaces)
throws IOException
Does the given file already exist in the given namespace?
name
- namespace
- namespaces
-
getConstructorForParam
public static String getConstructorForParam(Parameter param,
SymbolTable symbolTable,
BooleanHolder bThrow)
Return a constructor for the provided Parameter
This string will be suitable for assignment:
Foo var =
string returned
Handles basic java types (int, float, etc), wrapper types (Integer, etc)
and certain java.math (BigDecimal, BigInteger) types.
Will also handle all Axis specific types (org.apache.axis.types.*)
Caller should expect to wrap the construction in a try/catch block
if bThrow is set to
true.
param
- info about the parameter we need a constructor forsymbolTable
- used to lookup enumerationsbThrow
- set to true if contructor needs try/catch block
getEnumerationBaseAndValues
public static Vector getEnumerationBaseAndValues(Node node,
SymbolTable symbolTable)
If the specified node represents a supported JAX-RPC enumeration,
a Vector is returned which contains the base type and the enumeration values.
The first element in the vector is the base type (an TypeEntry).
Subsequent elements are values (Strings).
If this is not an enumeration, null is returned.
getFaultDataType
public static QName getFaultDataType(Message faultMessage,
SymbolTable symbolTable)
Given a fault message, return the XML type of the exception data.
faultMessage
- The WSDL fault message objectsymbolTable
- the current symbol table
- A QName for the XML type of the data
getFullExceptionName
public static String getFullExceptionName(Message faultMessage,
SymbolTable symbolTable)
Given a fault message, return the fully qualified Java class name
of the exception to be generated from this fault
faultMessage
- The WSDL fault messagesymbolTable
- the current symbol table
- A Java class name for the fault
getJavaLocalName
public static String getJavaLocalName(String fullName)
Query Java Local Name
getJavaPackageName
public static String getJavaPackageName(String fullName)
Query Java Package Name
getMIMETypeQName
public static QName getMIMETypeQName(String mimeName)
Given a MIME type, return the AXIS-specific type QName.
mimeName
- the MIME type name
- the AXIS-specific QName for the MIME type
getNewQName
public static String getNewQName(QName qname)
Common code for generating a QName in emitted code. Note that there's
no semicolon at the end, so we can use this in a variety of contexts.
getNewQNameWithLastLocalPart
public static String getNewQNameWithLastLocalPart(QName qname)
getOperationQName
public static QName getOperationQName(BindingOperation bindingOper,
BindingEntry bEntry,
SymbolTable symbolTable)
Return the operation QName. The namespace is determined from
the soap:body namespace, if it exists, otherwise it is "".
bindingOper
- the operationbEntry
- the symbol table binding entrysymbolTable
- SymbolTable
getOperationSOAPAction
public static String getOperationSOAPAction(BindingOperation bindingOper)
Return the SOAPAction (if any) of this binding operation
bindingOper
- the operation to look at
- the SOAPAction or null if not found
getParameterTypeName
public static String getParameterTypeName(Parameter parm)
Get the parameter type name. If this is a MIME type, then
figure out the appropriate type from the MIME type, otherwise
use the name of the type itself.
getResponseString
public static String getResponseString(Parameter param,
String var)
Return the Object variable 'var' cast to the appropriate type
doing the right thing for the primitive types.
getWrapperType
public static String getWrapperType(String type)
Return a "wrapper" type for the given type name. In other words,
if it's a primitive type ("int") return the java wrapper class
("java.lang.Integer"). Otherwise return the type name itself.
- the name of a java wrapper class for the type, or the type's
name if it's not primitive.
getWrapperType
public static String getWrapperType(TypeEntry type)
Returns a "wrapper" type for the given TypeEntry.
- the name of a java wrapper class for the type, or the type's
name if it's not a primitive.
getXSIType
public static QName getXSIType(Parameter param)
Get the QName that could be used in the xsi:type
when serializing an object for this parameter/return
- the QName of the parameter's xsi type
getXSIType
public static QName getXSIType(TypeEntry te)
Get the QName that could be used in the xsi:type
when serializing an object of the given type.
- the QName of the type's xsi type
hasMIME
public static boolean hasMIME(BindingEntry bEntry)
Are there any MIME parameters in the given binding?
hasMIME
public static boolean hasMIME(BindingEntry bEntry,
BindingOperation operation)
Are there any MIME parameters in the given binding's operation?
holder
public static String holder(Parameter p,
Emitter emitter)
Given a type, return the Java mapping of that type's holder.
p
- parameter whose holder class name we want to obtain.emitter
- the only Emitter
object embodying the running
instance of WSDL2Java.
- the name of the holder class for p.
isFaultComplex
public static boolean isFaultComplex(Message faultMessage,
SymbolTable symbolTable)
Given a fault message, return TRUE if the fault is a complex type fault
faultMessage
- The WSDL fault message objectsymbolTable
- the current symbol table
- A Java class name for the fault
isPrimitiveType
public static boolean isPrimitiveType(TypeEntry type)
Method isPrimitiveType
isXsNode
public static boolean isXsNode(Node node,
String nameName)
Determines if the DOM Node represents an xs:
makePackageName
public static String makePackageName(String namespace)
Method makePackageName
shouldEmit
public static boolean shouldEmit(TypeEntry type)
wrapPrimitiveType
public static String wrapPrimitiveType(TypeEntry type,
String var)
Return a string with "var" wrapped as an Object type if needed
xmlNameToJava
public static String xmlNameToJava(String name)
Map an XML name to a valid Java identifier
xmlNameToJavaClass
public static String xmlNameToJavaClass(String name)
Map an XML name to a valid Java identifier w/ capitolized first letter