csoap.wsdl
Class DeploymentGenerator

java.lang.Object
  extended bycsoap.wsdl.DeploymentGenerator
Direct Known Subclasses:
Generator

public class DeploymentGenerator
extends java.lang.Object


Constructor Summary
DeploymentGenerator()
           
 
Method Summary
protected  java.lang.String addAnUnderscoreBefore(java.lang.String str)
          Add an underscore before the given string.
protected  java.lang.String firstLetterToLowerCase(java.lang.String str)
          Converts the first letter of the given string to lower case
protected  java.lang.String firstLetterToUpperCase(java.lang.String str)
          Converts the first letter of the given string to upper case
 boolean generateWSDD(java.lang.String fileName, java.lang.String side, boolean verbose, java.lang.String dirName, java.lang.String implClass, java.lang.String scope)
          Generates files for deployng webservices applications.
protected  java.lang.String getJavaType(javax.xml.namespace.QName qname)
          Gets the Java type that maps the given XML type.
protected  java.lang.String getJavaType(java.lang.String XMLDataType, java.lang.String namespace)
          Gets the Java type that maps the given XML data type
protected  java.lang.String getPackageName(java.lang.String str)
          Gets the package given the whole type name.
protected  java.lang.String getPrefix(java.lang.String nameSpace)
          Gets the correct prefix given a namespace.
protected  java.lang.String resolveNamespaceURL(java.lang.String nsURI)
          Resolves URL-type namespaces, trasforming them into package names according the specification
protected  java.lang.String resolveNamespaceURN(java.lang.String nsURN)
          Resolves URN-type namespaces, trasforming them into package names according the specification
protected  boolean startWithADigit(java.lang.String str)
          Returns true if the first character is a number, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentGenerator

public DeploymentGenerator()
Method Detail

getPrefix

protected java.lang.String getPrefix(java.lang.String nameSpace)
Gets the correct prefix given a namespace. If the namespace is unknown, it returns null

Parameters:
nameSpace - a namespace
Returns:
the prefix if the mapping is known, null otherwise.

getPackageName

protected java.lang.String getPackageName(java.lang.String str)
Gets the package given the whole type name. Example getPackageName(java.lang.String) is java.lang

Parameters:
str - string to be processed
Returns:
the package name

getJavaType

protected java.lang.String getJavaType(javax.xml.namespace.QName qname)
Gets the Java type that maps the given XML type. QName class represents the value of a qualified name as specified in XML Schema Part2: Datatypes specification.

Parameters:
qname - a qname type representing the given XML type to be converted
Returns:
the java type if the mapping is known or the suitable user-defined Java type

getJavaType

protected java.lang.String getJavaType(java.lang.String XMLDataType,
                                       java.lang.String namespace)
Gets the Java type that maps the given XML data type

Parameters:
XMLDataType - a XML data type
namespace - its namespace
Returns:
the Java type if the mapping is known or the suitable user-defined Java type

resolveNamespaceURN

protected java.lang.String resolveNamespaceURN(java.lang.String nsURN)
Resolves URN-type namespaces, trasforming them into package names according the specification

Parameters:
nsURN - a URN-type namespace
Returns:
the package name according the specification

resolveNamespaceURL

protected java.lang.String resolveNamespaceURL(java.lang.String nsURI)
Resolves URL-type namespaces, trasforming them into package names according the specification

Parameters:
nsURI - a URL-type namespace
Returns:
the package name according the specification

firstLetterToUpperCase

protected java.lang.String firstLetterToUpperCase(java.lang.String str)
Converts the first letter of the given string to upper case

Parameters:
str - a string
Returns:
the given string with the first letter converted to upper case

firstLetterToLowerCase

protected java.lang.String firstLetterToLowerCase(java.lang.String str)
Converts the first letter of the given string to lower case

Parameters:
str - a string
Returns:
the given string with the first letter converted to lower case

addAnUnderscoreBefore

protected java.lang.String addAnUnderscoreBefore(java.lang.String str)
Add an underscore before the given string. This method is mainly used in the case of string that begin with numbers.

Parameters:
str - a string that is composed by an initial underscore character, followed by the given string

startWithADigit

protected boolean startWithADigit(java.lang.String str)
Returns true if the first character is a number, false otherwise.

Parameters:
str - a string
Returns:
true if the first character is a number, false otherwise

generateWSDD

public boolean generateWSDD(java.lang.String fileName,
                            java.lang.String side,
                            boolean verbose,
                            java.lang.String dirName,
                            java.lang.String implClass,
                            java.lang.String scope)
Generates files for deployng webservices applications. The following files are generated: 1) a WSDD deploy file

Parameters:
fileName - the WSDL file
side - indicates if the generation is for client or served side only. "c" stands for CLIENT, while "s" stands for server.
dirName - the directory for generated files
verbose - if true, debugging information are displayed
implClass - parameter implClass
Returns:
true if the generation is successful, false otherwise