com.sun.xml.ws.model
Class RuntimeModeler

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

public class RuntimeModeler
extends java.lang.Object

Creates a runtime model of a SEI (portClass).


Field Summary
static java.lang.String BEAN
           
static java.lang.String DecapitalizeExceptionBeanProperties
           
static java.lang.String DocWrappeeNamespapceQualified
           
static java.lang.Class<java.lang.Exception> EXCEPTION_CLASS
           
static java.lang.Class HOLDER_CLASS
           
static java.lang.String JAXWS_PACKAGE_PD
           
static java.lang.String PD_JAXWS_PACKAGE_PD
           
static java.lang.String PORT
           
static java.lang.Class<java.rmi.RemoteException> REMOTE_EXCEPTION_CLASS
           
static java.lang.String RESPONSE
           
static java.lang.String RETURN
           
static java.lang.Class<java.lang.RuntimeException> RUNTIME_EXCEPTION_CLASS
           
static java.lang.String SERVICE
           
static java.lang.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 java.lang.String capitalize(java.lang.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(java.lang.Class clazz)
           
static java.lang.String getNamespace(java.lang.String packageName)
          gets the namespace String for a given packageName
static javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass, MetadataReader reader, java.lang.String targetNamespace)
           
static javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass, MetadataReader reader, java.lang.String targetNamespace, boolean isStandard)
           
static javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass, java.lang.String targetNamespace)
          gets the wsdl:portName for a given implementation class
static javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass, java.lang.String targetNamespace, boolean isStandard)
           
static javax.xml.namespace.QName getPortTypeName(java.lang.Class<?> implOrSeiClass)
          Gives portType QName from implementatorClass or SEI
static javax.xml.namespace.QName getPortTypeName(java.lang.Class<?> implOrSeiClass, MetadataReader metadataReader)
           
static javax.xml.namespace.QName getPortTypeName(java.lang.Class<?> implOrSeiClass, java.lang.String tns, MetadataReader reader)
           
static javax.xml.namespace.QName getServiceName(java.lang.Class<?> implClass)
          gets the wsdl:serviceName for a given implementation class
static javax.xml.namespace.QName getServiceName(java.lang.Class<?> implClass, boolean isStandard)
           
static javax.xml.namespace.QName getServiceName(java.lang.Class<?> implClass, MetadataReader reader)
           
static javax.xml.namespace.QName getServiceName(java.lang.Class<?> implClass, MetadataReader reader, boolean isStandard)
           
protected  java.lang.reflect.Method getWSDLExceptionFaultInfo(java.lang.Class exception)
          returns the method that corresponds to "getFaultInfo".
protected  void processDocBareMethod(JavaMethodImpl javaMethod, java.lang.String operationName, java.lang.reflect.Method method)
          models a document/literal bare method
protected  void processDocWrappedMethod(JavaMethodImpl javaMethod, java.lang.String methodName, java.lang.String operationName, java.lang.reflect.Method method)
          models a document/literal wrapped method
protected  void processExceptions(JavaMethodImpl javaMethod, java.lang.reflect.Method method)
          models the exceptions thrown by method and adds them to the javaMethod runtime model object
protected  void processRpcMethod(JavaMethodImpl javaMethod, java.lang.String methodName, java.lang.String operationName, java.lang.reflect.Method method)
          models a rpc/literal method
 void setClassLoader(java.lang.ClassLoader classLoader)
          sets the classloader to be used when loading classes by the RuntimeModeler.
 void setPortName(javax.xml.namespace.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 java.lang.String PD_JAXWS_PACKAGE_PD
See Also:
Constant Field Values

JAXWS_PACKAGE_PD

public static final java.lang.String JAXWS_PACKAGE_PD
See Also:
Constant Field Values

RESPONSE

public static final java.lang.String RESPONSE
See Also:
Constant Field Values

RETURN

public static final java.lang.String RETURN
See Also:
Constant Field Values

BEAN

public static final java.lang.String BEAN
See Also:
Constant Field Values

SERVICE

public static final java.lang.String SERVICE
See Also:
Constant Field Values

PORT

public static final java.lang.String PORT
See Also:
Constant Field Values

HOLDER_CLASS

public static final java.lang.Class HOLDER_CLASS

REMOTE_EXCEPTION_CLASS

public static final java.lang.Class<java.rmi.RemoteException> REMOTE_EXCEPTION_CLASS

RUNTIME_EXCEPTION_CLASS

public static final java.lang.Class<java.lang.RuntimeException> RUNTIME_EXCEPTION_CLASS

EXCEPTION_CLASS

public static final java.lang.Class<java.lang.Exception> EXCEPTION_CLASS

DecapitalizeExceptionBeanProperties

public static final java.lang.String DecapitalizeExceptionBeanProperties
See Also:
Constant Field Values

SuppressDocLitWrapperGeneration

public static final java.lang.String SuppressDocLitWrapperGeneration
See Also:
Constant Field Values

DocWrappeeNamespapceQualified

public static final java.lang.String DocWrappeeNamespapceQualified
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(java.lang.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(javax.xml.namespace.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(java.lang.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 java.lang.String getNamespace(@NotNull
                                            java.lang.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,
                                       java.lang.String methodName,
                                       java.lang.String operationName,
                                       java.lang.reflect.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,
                                java.lang.String methodName,
                                java.lang.String operationName,
                                java.lang.reflect.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,
                                 java.lang.reflect.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 java.lang.reflect.Method getWSDLExceptionFaultInfo(java.lang.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,
                                    java.lang.String operationName,
                                    java.lang.reflect.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 java.lang.String capitalize(java.lang.String name)
utility to capitalize the first letter in a string

Parameters:
name - the string to capitalize
Returns:
the capitalized string

getServiceName

public static javax.xml.namespace.QName getServiceName(java.lang.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 javax.xml.namespace.QName getServiceName(java.lang.Class<?> implClass,
                                                       boolean isStandard)

getServiceName

public static javax.xml.namespace.QName getServiceName(java.lang.Class<?> implClass,
                                                       MetadataReader reader)

getServiceName

public static javax.xml.namespace.QName getServiceName(java.lang.Class<?> implClass,
                                                       MetadataReader reader,
                                                       boolean isStandard)

getPortName

public static javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass,
                                                    java.lang.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 javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass,
                                                    java.lang.String targetNamespace,
                                                    boolean isStandard)

getPortName

public static javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass,
                                                    MetadataReader reader,
                                                    java.lang.String targetNamespace)

getPortName

public static javax.xml.namespace.QName getPortName(java.lang.Class<?> implClass,
                                                    MetadataReader reader,
                                                    java.lang.String targetNamespace,
                                                    boolean isStandard)

getPortTypeName

public static javax.xml.namespace.QName getPortTypeName(java.lang.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 javax.xml.namespace.QName getPortTypeName(java.lang.Class<?> implOrSeiClass,
                                                        MetadataReader metadataReader)

getPortTypeName

public static javax.xml.namespace.QName getPortTypeName(java.lang.Class<?> implOrSeiClass,
                                                        java.lang.String tns,
                                                        MetadataReader reader)


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