Apache CXF API

org.apache.cxf.helpers
Class ServiceUtils

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

public final class ServiceUtils
extends Object


Method Summary
static String getMethodName(Method m)
           
static boolean isSchemaValidationEnabled(SchemaValidation.SchemaValidationType type, Message message)
          A short cut method to be able to test for if Schema Validation should be enabled for IN or OUT without having to check BOTH and IN or OUT.
static String makeNamespaceFromClassName(String className, String protocol)
          Generates the name of a XML namespace from a given class name and protocol.
static String makePackageName(String namespace)
          Method makePackageName
static QName makeQualifiedNameFromClass(Class<?> clazz)
           
static String makeServiceNameFromClassName(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

isSchemaValidationEnabled

public static boolean isSchemaValidationEnabled(SchemaValidation.SchemaValidationType type,
                                                Message message)
A short cut method to be able to test for if Schema Validation should be enabled for IN or OUT without having to check BOTH and IN or OUT.

Parameters:
message -
type -

makeServiceNameFromClassName

public static String makeServiceNameFromClassName(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 QName makeQualifiedNameFromClass(Class<?> clazz)

getMethodName

public static String getMethodName(Method m)

makeNamespaceFromClassName

public static String makeNamespaceFromClassName(String className,
                                                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 String makePackageName(String namespace)
Method makePackageName

Parameters:
namespace -

Apache CXF API

Apache CXF