org.apache.cxf.helpers

## Class ServiceUtils

- java.lang.Object
- - org.apache.cxf.helpers.ServiceUtils

-     public final class ServiceUtils
      extends Object

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getMethodName(Method m)`
    `static SchemaValidation.SchemaValidationType` | `getSchemaValidationType(Message message)` A convenience method to check for schema validation config in the message context, and then in the service model.
    `static SchemaValidation.SchemaValidationType` | `getSchemaValidationType(Object obj)`
    `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` -

    - #### getSchemaValidationType

          public static SchemaValidation.SchemaValidationType getSchemaValidationType(Message message)

      A convenience method to check for schema validation config in the message context, and then in the service model. Does not modify the Message context (other than what is done in the getContextualProperty itself)
      Parameters:
        `message` -

    - #### getSchemaValidationType

          public static SchemaValidation.SchemaValidationType getSchemaValidationType(Object obj)

    - #### 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