Package com.sun.xml.ws.model
Class RuntimeModeler
- java.lang.Object
-
- com.sun.xml.ws.model.RuntimeModeler
-
public class RuntimeModeler extends Object
Creates a runtime model of a SEI (portClass).- Author:
- WS Developement Team
-
-
Field Summary
Fields Modifier and Type Field Description static StringBEANstatic StringDecapitalizeExceptionBeanPropertiesstatic StringDocWrappeeNamespapceQualifiedstatic Class<Exception>EXCEPTION_CLASSstatic ClassHOLDER_CLASSstatic StringJAXWS_PACKAGE_PDstatic StringPD_JAXWS_PACKAGE_PDstatic StringPORTstatic StringREMOTE_EXCEPTION_CLASSstatic StringRESPONSEstatic StringRETURNstatic Class<RuntimeException>RUNTIME_EXCEPTION_CLASSstatic StringSERVICEstatic StringSuppressDocLitWrapperGeneration
-
Constructor Summary
Constructors Constructor Description RuntimeModeler(DatabindingConfig config)creates an instance of RunTimeModeler given aseiandbinding
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractSEIModelImplbuildRuntimeModel()builds the runtime model from theportClassusing the binding IDbindingId.static Stringcapitalize(String name)utility to capitalize the first letter in a stringprotected SOAPBindingImplcreateBinding(javax.jws.soap.SOAPBinding soapBinding)creates a runtime modelSOAPBindingfrom ajavax.jws.soap.SOAPBindingobjectprotected voiddetermineWebMethodUse(Class clazz)static Classerasure(Type type)static StringgetNamespace(String packageName)gets the namespaceStringfor a givenpackageNamestatic QNamegetPortName(Class<?> implClass, MetadataReader reader, String targetNamespace)static QNamegetPortName(Class<?> implClass, MetadataReader reader, String targetNamespace, boolean isStandard)static QNamegetPortName(Class<?> implClass, String targetNamespace)gets thewsdl:portNamefor a given implementation classstatic QNamegetPortName(Class<?> implClass, String targetNamespace, boolean isStandard)static QNamegetPortTypeName(Class<?> implOrSeiClass)Gives portType QName from implementatorClass or SEIstatic QNamegetPortTypeName(Class<?> implOrSeiClass, MetadataReader metadataReader)static QNamegetPortTypeName(Class<?> implOrSeiClass, String tns, MetadataReader reader)static QNamegetServiceName(Class<?> implClass)gets thewsdl:serviceNamefor a given implementation classstatic QNamegetServiceName(Class<?> implClass, boolean isStandard)static QNamegetServiceName(Class<?> implClass, MetadataReader reader)static QNamegetServiceName(Class<?> implClass, MetadataReader reader, boolean isStandard)protected MethodgetWSDLExceptionFaultInfo(Class exception)returns the method that corresponds to "getFaultInfo".protected voidprocessDocBareMethod(JavaMethodImpl javaMethod, String operationName, Method method)models a document/literal bare methodprotected voidprocessDocWrappedMethod(JavaMethodImpl javaMethod, String methodName, String operationName, Method method)models a document/literal wrapped methodprotected voidprocessExceptions(JavaMethodImpl javaMethod, Method method)models the exceptions thrown bymethodand adds them to thejavaMethodruntime model objectprotected voidprocessRpcMethod(JavaMethodImpl javaMethod, String methodName, String operationName, Method method)models a rpc/literal methodvoidsetClassLoader(ClassLoader classLoader)sets the classloader to be used when loading classes by theRuntimeModeler.voidsetPortName(QName portName)sets the PortName to be used by theRuntimeModeler.
-
-
-
Field Detail
-
PD_JAXWS_PACKAGE_PD
public static final String PD_JAXWS_PACKAGE_PD
- See Also:
- Constant Field Values
-
JAXWS_PACKAGE_PD
public static final String JAXWS_PACKAGE_PD
- See Also:
- Constant Field Values
-
RESPONSE
public static final String RESPONSE
- See Also:
- Constant Field Values
-
RETURN
public static final String RETURN
- See Also:
- Constant Field Values
-
BEAN
public static final String BEAN
- See Also:
- Constant Field Values
-
SERVICE
public static final String SERVICE
- See Also:
- Constant Field Values
-
PORT
public static final String PORT
- See Also:
- Constant Field Values
-
HOLDER_CLASS
public static final Class HOLDER_CLASS
-
REMOTE_EXCEPTION_CLASS
public static final String REMOTE_EXCEPTION_CLASS
- See Also:
- Constant Field Values
-
RUNTIME_EXCEPTION_CLASS
public static final Class<RuntimeException> RUNTIME_EXCEPTION_CLASS
-
DecapitalizeExceptionBeanProperties
public static final String DecapitalizeExceptionBeanProperties
- See Also:
- Constant Field Values
-
SuppressDocLitWrapperGeneration
public static final String SuppressDocLitWrapperGeneration
- See Also:
- Constant Field Values
-
DocWrappeeNamespapceQualified
public static final String DocWrappeeNamespapceQualified
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RuntimeModeler
public RuntimeModeler(@NotNull DatabindingConfig config)
creates an instance of RunTimeModeler given aseiandbinding- Parameters:
portClass- The SEI class to be modeled.serviceName- The ServiceName to use instead of one calculated from the implementation classwsdlPort-WSDLPortfeatures- web service features
-
-
Method Detail
-
setClassLoader
public void setClassLoader(ClassLoader classLoader)
sets the classloader to be used when loading classes by theRuntimeModeler.- Parameters:
classLoader- ClassLoader used to load classes
-
setPortName
public void setPortName(QName portName)
sets the PortName to be used by theRuntimeModeler.- Parameters:
portName- The PortName to be used instead of the PortName retrieved via annotations
-
buildRuntimeModel
public AbstractSEIModelImpl buildRuntimeModel()
builds the runtime model from theportClassusing the binding IDbindingId.- Returns:
- the runtime model for the
portClass.
-
determineWebMethodUse
protected void determineWebMethodUse(Class clazz)
-
createBinding
protected SOAPBindingImpl createBinding(javax.jws.soap.SOAPBinding soapBinding)
creates a runtime modelSOAPBindingfrom ajavax.jws.soap.SOAPBindingobject- Parameters:
soapBinding- thejavax.jws.soap.SOAPBindingto model- Returns:
- returns the runtime model SOAPBinding corresponding to
soapBinding
-
getNamespace
public static String getNamespace(@NotNull String packageName)
gets the namespaceStringfor a givenpackageName- Parameters:
packageName- the name of the package used to find a namespace. can be empty.- Returns:
- the namespace for the specified
packageName
-
processDocWrappedMethod
protected void processDocWrappedMethod(JavaMethodImpl javaMethod, String methodName, String operationName, Method method)
models a document/literal wrapped method- Parameters:
javaMethod- the runtime modelJavaMethodinstance being createdmethodName- the runtime modelJavaMethodinstance being createdoperationName- the runtime modelJavaMethodinstance being createdmethod- themethodto model
-
processRpcMethod
protected void processRpcMethod(JavaMethodImpl javaMethod, String methodName, String operationName, Method method)
models a rpc/literal method- Parameters:
javaMethod- the runtime modelJavaMethodinstance being createdmethodName- the name of themethodbeing modeled.operationName- the WSDL operation name for thismethodmethod- the runtime modelJavaMethodinstance being created
-
processExceptions
protected void processExceptions(JavaMethodImpl javaMethod, Method method)
models the exceptions thrown bymethodand adds them to thejavaMethodruntime model object- Parameters:
javaMethod- the runtime model object to add the exception model objects tomethod- themethodfrom which to find the exceptions to model
-
getWSDLExceptionFaultInfo
protected Method getWSDLExceptionFaultInfo(Class exception)
returns the method that corresponds to "getFaultInfo". Returns null if this is not an exception generated from a WSDL- Parameters:
exception- the class to search for the "getFaultInfo" method- Returns:
- the method named "getFaultInfo" if this is an exception generated from WSDL or an
exception that contains the
WebFaultannotation. Otherwise it returns null
-
processDocBareMethod
protected void processDocBareMethod(JavaMethodImpl javaMethod, String operationName, Method method)
models a document/literal bare method- Parameters:
javaMethod- the runtime modelJavaMethodinstance being createdoperationName- the runtime modelJavaMethodinstance being createdmethod- the runtime modelJavaMethodinstance being created
-
capitalize
public static String capitalize(String name)
utility to capitalize the first letter in a string- Parameters:
name- the string to capitalize- Returns:
- the capitalized string
-
getServiceName
public static QName getServiceName(Class<?> implClass)
gets thewsdl:serviceNamefor a given implementation class- Parameters:
implClass- the implementation class- Returns:
- the
wsdl:serviceNamefor theimplClass
-
getServiceName
public static QName getServiceName(Class<?> implClass, MetadataReader reader)
-
getServiceName
public static QName getServiceName(Class<?> implClass, MetadataReader reader, boolean isStandard)
-
getPortName
public static QName getPortName(Class<?> implClass, String targetNamespace)
gets thewsdl:portNamefor a given implementation class- Parameters:
implClass- the implementation classtargetNamespace- Namespace URI for service name- Returns:
- the
wsdl:portNamefor theimplClass
-
getPortName
public static QName getPortName(Class<?> implClass, String targetNamespace, boolean isStandard)
-
getPortName
public static QName getPortName(Class<?> implClass, MetadataReader reader, String targetNamespace)
-
getPortName
public static QName getPortName(Class<?> implClass, MetadataReader reader, String targetNamespace, boolean isStandard)
-
getPortTypeName
public static QName getPortTypeName(Class<?> implOrSeiClass)
Gives portType QName from implementatorClass or SEI- Parameters:
implOrSeiClass- cant be null- Returns:
wsdl:portType@name, null if it could not find the annotated class.
-
getPortTypeName
public static QName getPortTypeName(Class<?> implOrSeiClass, MetadataReader metadataReader)
-
getPortTypeName
public static QName getPortTypeName(Class<?> implOrSeiClass, String tns, MetadataReader reader)
-
-