Apache CXF API

org.apache.cxf.helpers
Class ServiceUtils

java.lang.Object
  extended by org.apache.cxf.helpers.ServiceUtils

public final class ServiceUtils
extends java.lang.Object


Method Summary
static java.lang.String getMethodName(java.lang.reflect.Method m)
           
static java.lang.String makeNamespaceFromClassName(java.lang.String className, java.lang.String protocol)
          Generates the name of a XML namespace from a given class name and protocol.
static java.lang.String makePackageName(java.lang.String namespace)
          Method makePackageName
static javax.xml.namespace.QName makeQualifiedNameFromClass(java.lang.Class<?> clazz)
           
static java.lang.String makeServiceNameFromClassName(java.lang.Class<?> clazz)
          Generates a suitable service name from a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeServiceNameFromClassName

public static java.lang.String makeServiceNameFromClassName(java.lang.Class<?> clazz)
Generates a suitable service name from a given class. The returned name is the simple name of the class, i.e. without the package name.

Parameters:
clazz - the class.
Returns:
the name.

makeQualifiedNameFromClass

public static javax.xml.namespace.QName makeQualifiedNameFromClass(java.lang.Class<?> clazz)

getMethodName

public static java.lang.String getMethodName(java.lang.reflect.Method m)

makeNamespaceFromClassName

public static java.lang.String makeNamespaceFromClassName(java.lang.String className,
                                                          java.lang.String protocol)
Generates the name of a XML namespace from a given class name and protocol. The returned namespace will take the form protocol://domain, where protocol is the given protocol, and domain the inversed package name of the given class name.

For instance, if the given class name is org.codehaus.xfire.services.Echo, and the protocol is http, the resulting namespace would be http://services.xfire.codehaus.org.

Parameters:
className - the class name
protocol - the protocol (eg. http)
Returns:
the namespace

makePackageName

public static java.lang.String makePackageName(java.lang.String namespace)
Method makePackageName

Parameters:
namespace -
Returns:

Apache CXF API

Apache CXF