org.apache.muse.tools.inspector
Class ResourceInspector
java.lang.Object
org.apache.muse.tools.inspector.ResourceInspector
public class ResourceInspector
- extends Object
This tool allows a client to dynamically discover the properties and operations
of a resource by parsing its WSDL. The inspector provides all of the data
structures necessary to invoke operations with the proper SOAP messages and
to reason about properties and their metadata. Its chief use is as the data
model to the client generator that converts WSDL to a Java interface/class.
The inspector can also be used in browser/explorer-like clients that do not
know anything about the resource interfaces they will communicate with ahead
of time. By providing a WSDL, a client can show (via UI) a user all of the
properties and operations that are available, as well as a list of what
parameters/return types to expect. The inspector can take care of converting
input parameter values into the proper SOAP messages based on the WSDL, and
then convert the response message back to the expected type.
- Author:
- Dan Jemiolo (danj), Andrew Eberbach (aeberbac)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAMESPACE_URI
public static final String NAMESPACE_URI
- See Also:
- Constant Field Values
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
ANY_TYPE_QNAME
public static final QName ANY_TYPE_QNAME
ANY_URI_QNAME
public static final QName ANY_URI_QNAME
ATTRIBUTE_GROUP_QNAME
public static final QName ATTRIBUTE_GROUP_QNAME
ATTRIBUTE_QNAME
public static final QName ATTRIBUTE_QNAME
BOOLEAN_QNAME
public static final QName BOOLEAN_QNAME
COMPLEX_TYPE_QNAME
public static final QName COMPLEX_TYPE_QNAME
DATE_QNAME
public static final QName DATE_QNAME
DATE_TIME_QNAME
public static final QName DATE_TIME_QNAME
DOUBLE_QNAME
public static final QName DOUBLE_QNAME
DURATION_QNAME
public static final QName DURATION_QNAME
ELEMENT_QNAME
public static final QName ELEMENT_QNAME
FLOAT_QNAME
public static final QName FLOAT_QNAME
IMPORT_QNAME
public static final QName IMPORT_QNAME
INCLUDE_QNAME
public static final QName INCLUDE_QNAME
INT_QNAME
public static final QName INT_QNAME
INTEGER_QNAME
public static final QName INTEGER_QNAME
LANGSTRING_QNAME
public static final QName LANGSTRING_QNAME
LONG_QNAME
public static final QName LONG_QNAME
NC_NAME_QNAME
public static final QName NC_NAME_QNAME
QNAME_QNAME
public static final QName QNAME_QNAME
SCHEMA_QNAME
public static final QName SCHEMA_QNAME
SEQUENCE_QNAME
public static final QName SEQUENCE_QNAME
SHORT_QNAME
public static final QName SHORT_QNAME
SIMPLE_TYPE_QNAME
public static final QName SIMPLE_TYPE_QNAME
STRING_QNAME
public static final QName STRING_QNAME
ResourceInspector
public ResourceInspector()
getLowerCamelName
public static String getLowerCamelName(String operationName)
getSchemaType
public static QName getSchemaType(Class type)
- Parameters:
type
- A Class representing the Java type that maps to the XSD type.
- Returns:
- The QName of the XSD type representing the given Java type,
or ANY_TYPE_QNAME if no such mapping exists.
getXsdJavaType
public static Class getXsdJavaType(QName typeName)
- Parameters:
typeName
- The _name of an XSD built-in type (or WS-A EndpointReference).
- Returns:
- A Class representing the Java type that maps to the XSD
type, or null if no mapping exists.
getAction
public String getAction(String operation)
getBaseProxyClass
public Class getBaseProxyClass()
getJavaMethods
public Map getJavaMethods()
getOperations
public Collection getOperations()
getParameterNames
public String[] getParameterNames(String operation)
getParameterQNames
public QName[] getParameterQNames(String operation)
getParameterSchemaTypes
public QName[] getParameterSchemaTypes(String operation)
getParameterTypes
public Class[] getParameterTypes(String operation)
getPortType
public QName getPortType()
getProperties
public Collection getProperties()
getPropertyType
public Class getPropertyType(QName property)
getRequestName
public QName getRequestName(String operation)
getReturnName
public QName getReturnName(String operation)
getReturnSchemaType
public QName getReturnSchemaType(String operation)
getReturnType
public Class getReturnType(String operation)
invoke
public Object invoke(WsResourceClient resource,
String operation,
Object[] parameters)
throws SoapFault
- This method will invoke form the proper SOAP request for the given
operation and parameters and send it to the resource represented by
the given client. The response is the content of the SOAP response's
Body, deserialized into POJO form.
- Throws:
SoapFault
isBasicResourceOperation
public boolean isBasicResourceOperation(QName name)
isBasicResourceOperation
public boolean isBasicResourceOperation(String name)
isPropertyAppendable
public boolean isPropertyAppendable(QName property)
isPropertyMultiple
public boolean isPropertyMultiple(QName property)
isPropertyMutable
public boolean isPropertyMutable(QName property)
run
public void run(Element wsdl)
run
public void run(Element wsdl,
Environment env)
setMetadata
public void setMetadata(MetadataDescriptor descriptor)
getMetadata
public MetadataDescriptor getMetadata()
Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.