Package org.apache.cxf.helpers
Class ServiceUtils
java.lang.Object
org.apache.cxf.helpers.ServiceUtils
-
Method Summary
Modifier and TypeMethodDescriptiongetSchemaValidationType
(Message message) A convenience method to check for schema validation config in the message context, and then in the service model.static boolean
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.
-
Method Details
-
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
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
-
makeServiceNameFromClassName
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
Generates the name of a XML namespace from a given class name and protocol. The returned namespace will take the formprotocol://domain
, whereprotocol
is the given protocol, anddomain
the inversed package name of the given class name. For instance, if the given class name isorg.codehaus.xfire.services.Echo
, and the protocol ishttp
, the resulting namespace would behttp://services.xfire.codehaus.org
.- Parameters:
className
- the class nameprotocol
- the protocol (eg.http
)- Returns:
- the namespace
-