ServiceUtils (Apache CXF JavaDoc 3.6.11 API)

Package org.apache.cxf.helpers

## Class ServiceUtils

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

-     public final class ServiceUtils
      extends Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static SchemaValidation.SchemaValidationType` | `getSchemaValidationType​(Object obj)` |
    `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 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` | `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.

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