public final class ServiceUtils extends Object
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.
|
public static boolean isSchemaValidationEnabled(SchemaValidation.SchemaValidationType type, Message message)
message
- type
- public static SchemaValidation.SchemaValidationType getSchemaValidationType(Message message)
message
- type
- public static SchemaValidation.SchemaValidationType getSchemaValidationType(Object obj)
public static String makeServiceNameFromClassName(Class<?> clazz)
clazz
- the class.public static String makeNamespaceFromClassName(String className, String protocol)
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
.className
- the class nameprotocol
- the protocol (eg. http
)Copyright © 2018 JBoss by Red Hat. All rights reserved.