com.sun.xml.ws.model
Class RuntimeModeler

java.lang.Object
  extended by com.sun.xml.ws.model.RuntimeModeler

public class RuntimeModeler
extends Object

Creates a runtime model of a SEI (portClass).


Field Summary
static String BEAN
           
static String DecapitalizeExceptionBeanProperties
           
static Class<Exception> EXCEPTION_CLASS
           
static Class HOLDER_CLASS
           
static String JAXWS_PACKAGE_PD
           
static String PD_JAXWS_PACKAGE_PD
           
static String PORT
           
static Class<RemoteException> REMOTE_EXCEPTION_CLASS
           
static String RESPONSE
           
static String RETURN
           
static Class<RuntimeException> RUNTIME_EXCEPTION_CLASS
           
static String SERVICE
           
static String SuppressDocLitWrapperGeneration
           
 
Constructor Summary
RuntimeModeler(DatabindingConfig config)
          creates an instance of RunTimeModeler given a sei and binding
 
Method Summary
 AbstractSEIModelImpl buildRuntimeModel()
          builds the runtime model from the portClass using the binding ID bindingId.
static String capitalize(String name)
          utility to capitalize the first letter in a string
protected  SOAPBindingImpl createBinding(javax.jws.soap.SOAPBinding soapBinding)
          creates a runtime model SOAPBinding from a javax.jws.soap.SOAPBinding object
protected  void determineWebMethodUse(Class clazz)
           
(package private) static
<A extends Annotation>
A
getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader)
           
static String getNamespace(String packageName)
          gets the namespace String for a given packageName
static QName getPortName(Class<?> implClass, String targetNamespace)
          gets the wsdl:portName for a given implementation class
static QName getPortName(Class<?> implClass, String targetNamespace, boolean isStandard)
           
static QName getPortName(Class<?> implClass, String targetNamespace, MetadataReader reader)
           
static QName getPortName(Class<?> implClass, String targetNamespace, MetadataReader reader, boolean isStandard)
           
static QName getPortTypeName(Class<?> implOrSeiClass)
          Gives portType QName from implementatorClass or SEI
static QName getPortTypeName(Class<?> implOrSeiClass, String tns, MetadataReader reader)
           
static QName getServiceName(Class<?> implClass)
          gets the wsdl:serviceName for a given implementation class
static QName getServiceName(Class<?> implClass, boolean isStandard)
           
static QName getServiceName(Class<?> implClass, MetadataReader reader)
           
static QName getServiceName(Class<?> implClass, MetadataReader reader, boolean isStandard)
           
protected  Method getWSDLExceptionFaultInfo(Class exception)
          returns the method that corresponds to "getFaultInfo".
(package private)  void processClass(Class clazz)
           
protected  void processDocBareMethod(JavaMethodImpl javaMethod, String operationName, Method method)
          models a document/literal bare method
protected  void processDocWrappedMethod(JavaMethodImpl javaMethod, String methodName, String operationName, Method method)
          models a document/literal wrapped method
protected  void processExceptions(JavaMethodImpl javaMethod, Method method)
          models the exceptions thrown by method and adds them to the javaMethod runtime model object
protected  void processRpcMethod(JavaMethodImpl javaMethod, String methodName, String operationName, Method method)
          models a rpc/literal method
 void setClassLoader(ClassLoader classLoader)
          sets the classloader to be used when loading classes by the RuntimeModeler.
 void setPortName(QName portName)
          sets the PortName to be used by the RuntimeModeler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 Class<RemoteException> REMOTE_EXCEPTION_CLASS

RUNTIME_EXCEPTION_CLASS

public static final Class<RuntimeException> RUNTIME_EXCEPTION_CLASS

EXCEPTION_CLASS

public static final Class<Exception> EXCEPTION_CLASS

DecapitalizeExceptionBeanProperties

public static final String DecapitalizeExceptionBeanProperties
See Also:
Constant Field Values

SuppressDocLitWrapperGeneration

public static final String SuppressDocLitWrapperGeneration
See Also:
Constant Field Values
Constructor Detail

RuntimeModeler

public RuntimeModeler(@NotNull
                      DatabindingConfig config)
creates an instance of RunTimeModeler given a sei and binding

Parameters:
portClass - The SEI class to be modeled.
serviceName - The ServiceName to use instead of one calculated from the implementation class
wsdlPort - WSDLPort
features - web service features
Method Detail

setClassLoader

public void setClassLoader(ClassLoader classLoader)
sets the classloader to be used when loading classes by the RuntimeModeler.

Parameters:
classLoader - ClassLoader used to load classes

setPortName

public void setPortName(QName portName)
sets the PortName to be used by the RuntimeModeler.

Parameters:
portName - The PortName to be used instead of the PortName retrieved via annotations

buildRuntimeModel

public AbstractSEIModelImpl buildRuntimeModel()
builds the runtime model from the portClass using the binding ID bindingId.

Returns:
the runtime model for the portClass.

determineWebMethodUse

protected void determineWebMethodUse(Class clazz)

processClass

void processClass(Class clazz)

createBinding

protected SOAPBindingImpl createBinding(javax.jws.soap.SOAPBinding soapBinding)
creates a runtime model SOAPBinding from a javax.jws.soap.SOAPBinding object

Parameters:
soapBinding - the javax.jws.soap.SOAPBinding to model
Returns:
returns the runtime model SOAPBinding corresponding to soapBinding

getNamespace

public static String getNamespace(@NotNull
                                  String packageName)
gets the namespace String for a given packageName

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 model JavaMethod instance being created
methodName - the runtime model JavaMethod instance being created
operationName - the runtime model JavaMethod instance being created
method - the method to model

processRpcMethod

protected void processRpcMethod(JavaMethodImpl javaMethod,
                                String methodName,
                                String operationName,
                                Method method)
models a rpc/literal method

Parameters:
javaMethod - the runtime model JavaMethod instance being created
methodName - the name of the method being modeled.
operationName - the WSDL operation name for this method
method - the runtime model JavaMethod instance being created

processExceptions

protected void processExceptions(JavaMethodImpl javaMethod,
                                 Method method)
models the exceptions thrown by method and adds them to the javaMethod runtime model object

Parameters:
javaMethod - the runtime model object to add the exception model objects to
method - the method from 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 WebFault annotation. Otherwise it returns null

processDocBareMethod

protected void processDocBareMethod(JavaMethodImpl javaMethod,
                                    String operationName,
                                    Method method)
models a document/literal bare method

Parameters:
javaMethod - the runtime model JavaMethod instance being created
operationName - the runtime model JavaMethod instance being created
method - the runtime model JavaMethod instance 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 the wsdl:serviceName for a given implementation class

Parameters:
implClass - the implementation class
Returns:
the wsdl:serviceName for the implClass

getServiceName

public static QName getServiceName(Class<?> implClass,
                                   boolean isStandard)

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 the wsdl:portName for a given implementation class

Parameters:
implClass - the implementation class
targetNamespace - Namespace URI for service name
Returns:
the wsdl:portName for the implClass

getPortName

public static QName getPortName(Class<?> implClass,
                                String targetNamespace,
                                boolean isStandard)

getPortName

public static QName getPortName(Class<?> implClass,
                                String targetNamespace,
                                MetadataReader reader)

getPortName

public static QName getPortName(Class<?> implClass,
                                String targetNamespace,
                                MetadataReader reader,
                                boolean isStandard)

getAnnotation

static <A extends Annotation> A getAnnotation(Class<A> t,
                                              Class<?> cls,
                                              MetadataReader reader)

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,
                                    String tns,
                                    MetadataReader reader)


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.