|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.deployment.util.Utils
public class Utils
Field Summary | |
---|---|
static String |
defaultEncoding
|
Constructor Summary | |
---|---|
Utils()
|
Method Summary | |
---|---|
static void |
addEndpointsToService(AxisService axisService)
|
static void |
addEndpointsToService(AxisService axisService,
AxisConfiguration axisConfiguration)
|
static void |
addExcludeMethods(ArrayList<String> excludeList)
Add the Axis2 lifecycle / session methods to a pre-existing list of names that will be excluded when generating schemas. |
static void |
addFlowHandlers(Flow flow,
ClassLoader clsLoader)
|
static void |
addHttpEndpoint(AxisService axisService,
String url)
|
static void |
addHttpEndpoint(AxisService axisService,
String protocol,
String endpointName)
|
static void |
addSoap11Endpoint(AxisService axisService,
String url)
|
static void |
addSoap11Endpoint(AxisService axisService,
String protocol,
String endpointName)
|
static void |
addSoap12Endpoint(AxisService axisService,
String url)
|
static void |
addSoap12Endpoint(AxisService axisService,
String protocol,
String endpointName)
|
static ClassLoader |
createClassLoader(ArrayList urls,
ClassLoader serviceClassLoader,
boolean extractJars,
File tmpDir,
boolean isChildFirstClassLoading)
|
static DeploymentClassLoader |
createClassLoader(File serviceFile,
boolean isChildFirstClassLoading)
|
static ClassLoader |
createClassLoader(URL[] urls,
ClassLoader serviceClassLoader,
boolean extractJars,
File tmpDir,
boolean isChildFirstClassLoading)
|
static File |
createTempFile(String suffix,
InputStream in,
File tmpDir)
|
static void |
deployModuleServices(AxisModule module,
ConfigurationContext configCtx)
Modules can contain services in some cases. |
static void |
fillAxisService(AxisService axisService,
AxisConfiguration axisConfig,
ArrayList<String> excludeOperations,
ArrayList<String> nonRpcMethods)
This guy will create a AxisService using java reflection |
static List |
findLibJars(URL url)
Get names of all *.jar files inside the lib/ directory of a given jar URL |
static String |
formatPath(String path)
Format the string paths to match any platform.. |
static String |
getAnnotatedServiceName(Class serviceClass,
WebServiceAnnotation serviceAnnotation)
The util method to prepare the JSR 181 annotated service name from given annotation or for defaults JSR 181 specifies that the in javax.jws.WebService the parameter serviceName contains the wsdl:service name to mapp. |
static AxisOperation |
getAxisOperationForJmethod(Method method)
|
static AxisBindingMessage |
getBindingMessage(AxisBindingOperation bindingOperation,
AxisMessage message)
|
static AxisBindingOperation |
getBindingOperation(AxisBinding binding,
AxisOperation operation)
|
static ClassLoader |
getClassLoader(ClassLoader parent,
File file,
boolean isChildFirstClassLoading)
Get a ClassLoader which contains a classpath of a) the passed directory and b) any jar files inside the "lib/" or "Lib/" subdirectory of the passed directory. |
static ClassLoader |
getClassLoader(ClassLoader parent,
String path,
boolean isChildFirstClassLoading)
|
static String |
getClassNameFromResourceName(String resourceName)
Get the class name from a resource name referring to a class file. |
static AxisBinding |
getHttpBinding(AxisService service)
|
static String |
getHTTPInputSerializationFromServicesXML(AxisOperation operation)
get http input mime type from the services xml |
static String |
getHTTPLoacationFromServicesXML(AxisOperation operation)
extract the http location from services xml related to given operation |
static String |
getHTTPMethodFromServicesXML(AxisOperation operation)
extract the http method from services xml related to given operation |
static String |
getHTTPOutputSerializationFromservicesXML(AxisOperation operation)
get http output mime type from the services xml |
static List<String> |
getListOfClasses(DeploymentFileData deploymentFileData)
Scan a JAR file and return the list of classes contained in the JAR. |
static org.apache.axiom.om.OMElement |
getParameter(String name,
String value,
boolean locked)
|
static String |
getPath(String parent,
String childPath)
|
static String |
getServiceHierarchy(String filePath,
String serviceDir)
Computes the hierarchical part of the service name if this is such a service path. |
static String |
getShortFileName(String filename)
|
static AxisBinding |
getSoap11Binding(AxisService service)
|
static AxisBinding |
getSoap12Binding(AxisService service)
|
static URL[] |
getURLsForAllJars(URL url,
File tmpDir)
|
static boolean |
isHttpBinding(AxisBinding binding)
|
static boolean |
isSoap11Binding(AxisBinding binding)
|
static boolean |
isSoap12Binding(AxisBinding binding)
|
static boolean |
loadHandler(ClassLoader loader1,
HandlerDescription desc)
|
static void |
logFaultyServiceInfo(AxisConfiguration axisConfig)
Log faulty services info due to unavailability of modules and transports |
static String |
normalize(String uri)
Normalize a uri containing ../ and ./ paths. |
static void |
processBeanPropertyExclude(AxisService service)
This method is to process bean exclude parameter and the XML format of that would be |
static void |
processPolicyAttachments(Iterator attachmentElements,
AxisService service)
|
static void |
setEndpointsToAllUsedBindings(AxisService axisService)
|
static File |
toFile(URL url)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String defaultEncoding
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static void addFlowHandlers(Flow flow, ClassLoader clsLoader) throws AxisFault
AxisFault
public static boolean loadHandler(ClassLoader loader1, HandlerDescription desc) throws DeploymentException
DeploymentException
public static URL[] getURLsForAllJars(URL url, File tmpDir)
public static File createTempFile(String suffix, InputStream in, File tmpDir) throws IOException
IOException
public static ClassLoader getClassLoader(ClassLoader parent, String path, boolean isChildFirstClassLoading) throws DeploymentException
DeploymentException
public static ClassLoader getClassLoader(ClassLoader parent, File file, boolean isChildFirstClassLoading) throws DeploymentException
parent
- parent ClassLoader which will be the parent of the result of this methodfile
- a File which must be a directory for this to be useful
DeploymentException
- if problems occurpublic static void fillAxisService(AxisService axisService, AxisConfiguration axisConfig, ArrayList<String> excludeOperations, ArrayList<String> nonRpcMethods) throws Exception
axisService
- the target AxisServiceaxisConfig
- the in-scope AxisConfigurationexcludeOperations
- a List of Strings (or null), each containing a method to excludenonRpcMethods
- a List of Strings (or null), each containing a non-rpc method name
Exception
- if a problem occurspublic static AxisOperation getAxisOperationForJmethod(Method method) throws AxisFault
AxisFault
public static org.apache.axiom.om.OMElement getParameter(String name, String value, boolean locked)
public static void deployModuleServices(AxisModule module, ConfigurationContext configCtx) throws AxisFault
The code looks for an "aars/" directory inside the module (either .mar or exploded), and an "aars.list" file inside that to figure out which services to deploy. Note that all services deployed this way will have access to the Module's classes.
module
- the AxisModule to search for servicesconfigCtx
- ConfigurationContext in which to deploy
AxisFault
public static String normalize(String uri)
uri
- The uri path to normalize
public static String getPath(String parent, String childPath)
public static List findLibJars(URL url)
url
- base URL of a JAR to search
public static void addExcludeMethods(ArrayList<String> excludeList)
excludeList
- an ArrayList containing method names - we'll add ours to this.public static DeploymentClassLoader createClassLoader(File serviceFile, boolean isChildFirstClassLoading) throws MalformedURLException
MalformedURLException
public static ClassLoader createClassLoader(ArrayList urls, ClassLoader serviceClassLoader, boolean extractJars, File tmpDir, boolean isChildFirstClassLoading)
public static File toFile(URL url) throws UnsupportedEncodingException
UnsupportedEncodingException
public static ClassLoader createClassLoader(URL[] urls, ClassLoader serviceClassLoader, boolean extractJars, File tmpDir, boolean isChildFirstClassLoading)
public static void processBeanPropertyExclude(AxisService service)
service
- , AxisService objectpublic static String getShortFileName(String filename)
public static String getAnnotatedServiceName(Class serviceClass, WebServiceAnnotation serviceAnnotation)
serviceClass
- the service ClassserviceAnnotation
- a WebService annotation, or null
public static void addEndpointsToService(AxisService axisService) throws AxisFault
AxisFault
public static void setEndpointsToAllUsedBindings(AxisService axisService)
public static void addEndpointsToService(AxisService axisService, AxisConfiguration axisConfiguration) throws AxisFault
AxisFault
public static void addSoap11Endpoint(AxisService axisService, String url) throws Exception
Exception
public static void addSoap11Endpoint(AxisService axisService, String protocol, String endpointName) throws Exception
Exception
public static void addSoap12Endpoint(AxisService axisService, String url) throws Exception
Exception
public static void addSoap12Endpoint(AxisService axisService, String protocol, String endpointName) throws Exception
Exception
public static void addHttpEndpoint(AxisService axisService, String url)
public static void addHttpEndpoint(AxisService axisService, String protocol, String endpointName)
public static void processPolicyAttachments(Iterator attachmentElements, AxisService service) throws XMLStreamException, FactoryConfigurationError
XMLStreamException
FactoryConfigurationError
public static boolean isSoap11Binding(AxisBinding binding)
public static boolean isSoap12Binding(AxisBinding binding)
public static boolean isHttpBinding(AxisBinding binding)
public static AxisBinding getSoap11Binding(AxisService service)
public static AxisBinding getSoap12Binding(AxisService service)
public static AxisBinding getHttpBinding(AxisService service)
public static AxisBindingOperation getBindingOperation(AxisBinding binding, AxisOperation operation)
public static AxisBindingMessage getBindingMessage(AxisBindingOperation bindingOperation, AxisMessage message)
public static String getHTTPLoacationFromServicesXML(AxisOperation operation)
operation
-
public static String getHTTPMethodFromServicesXML(AxisOperation operation)
operation
-
public static String getHTTPInputSerializationFromServicesXML(AxisOperation operation)
operation
-
public static String getHTTPOutputSerializationFromservicesXML(AxisOperation operation)
operation
-
public static void logFaultyServiceInfo(AxisConfiguration axisConfig)
axisConfig
- public static String getServiceHierarchy(String filePath, String serviceDir)
filePath
- - input file path of the deploying fileserviceDir
- - 'services', 'pojo', 'servicejars' etc..
public static String formatPath(String path)
path
- - input file path
public static String getClassNameFromResourceName(String resourceName)
resourceName
- the resource name
public static List<String> getListOfClasses(DeploymentFileData deploymentFileData) throws DeploymentException
deploymentFileData
- the JAR to scan
DeploymentException
- if an error occurs while scanning the file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |