Package io.wcm.caravan.jaxws.consumer
Class JaxWsClientInitializer
- java.lang.Object
-
- io.wcm.caravan.jaxws.consumer.JaxWsClientInitializer
-
@ConsumerType public class JaxWsClientInitializer extends Object
Default JAX-WS SOAP client initializer
-
-
Field Summary
Fields Modifier and Type Field Description static String[]
SENSITIVE_PROPERTY_NAMES
List of properties of this class that contain sensitive information which should not be logged.
-
Constructor Summary
Constructors Constructor Description JaxWsClientInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addInterceptors(org.apache.cxf.endpoint.Client endpointClient)
Add interceptors (e.g. for request/response logging)Object
createClient(org.apache.cxf.jaxws.JaxWsProxyFactoryBean factory)
Initialize SOAP client pFactory and create SOAP client object instance.org.apache.cxf.frontend.ClientFactoryBean
createClientFactoryBean()
Get JAX-WS client factory bean instance.protected Object
createPortObject(org.apache.cxf.jaxws.JaxWsProxyFactoryBean factory)
Create port objectboolean
equals(Object pObj)
int
getConnectTimeout()
String
getHttpPassword()
String
getHttpUser()
String
getKeyManagerType()
String
getKeyStorePassword()
String
getKeyStorePath()
String
getKeyStoreProvider()
String
getKeyStoreType()
String
getProxyHost()
String
getProxyPassword()
int
getProxyPort()
String
getProxyUser()
int
getSocketTimeout()
String
getSslContextType()
org.apache.cxf.configuration.jsse.TLSClientParameters
getTLSClientParameters()
Create TLS client parameters based on given certstore path/password parameters.String
getTrustManagerType()
String
getTrustStorePassword()
String
getTrustStorePath()
String
getTrustStoreProvider()
String
getTrustStoreType()
String
getWSAddressingToUri()
int
hashCode()
protected void
initializeEndpointClient(org.apache.cxf.endpoint.Client endpointClient)
Initialize endpoint clientvoid
initializeFactory(org.apache.cxf.jaxws.JaxWsProxyFactoryBean factory)
Initialize JAXWS proxy factory beanprotected void
initializeHttpConduit(org.apache.cxf.transport.http.HTTPConduit httpConduit)
Initialize HTTP conduitboolean
isAllowChunking()
boolean
isIgnoreUnexpectedElements()
void
setAllowChunking(boolean value)
void
setConnectTimeout(int value)
void
setHttpPassword(String value)
void
setHttpUser(String value)
void
setIgnoreUnexpectedElements(boolean value)
void
setKeyManagerType(String value)
void
setKeyStorePassword(String value)
void
setKeyStorePath(String value)
void
setKeyStoreProvider(String value)
void
setKeyStoreType(String value)
void
setProxyHost(String value)
void
setProxyPassword(String value)
void
setProxyPort(int value)
void
setProxyUser(String value)
void
setSocketTimeout(int value)
void
setSslContextType(String value)
void
setTLSClientParameters(org.apache.cxf.configuration.jsse.TLSClientParameters value)
void
setTrustManagerType(String value)
void
setTrustStorePassword(String vaule)
void
setTrustStorePath(String value)
void
setTrustStoreProvider(String value)
void
setTrustStoreType(String value)
void
setWSAddressingToUri(String value)
-
-
-
Field Detail
-
SENSITIVE_PROPERTY_NAMES
public static final String[] SENSITIVE_PROPERTY_NAMES
List of properties of this class that contain sensitive information which should not be logged.
-
-
Method Detail
-
initializeFactory
public void initializeFactory(org.apache.cxf.jaxws.JaxWsProxyFactoryBean factory)
Initialize JAXWS proxy factory bean- Parameters:
factory
- JAXWS Proxy factory bean
-
createClient
public Object createClient(org.apache.cxf.jaxws.JaxWsProxyFactoryBean factory)
Initialize SOAP client pFactory and create SOAP client object instance.- Parameters:
factory
- JAXWS proxy pFactory bean (has to be already initialized)- Returns:
- SOAP client object
-
createPortObject
protected Object createPortObject(org.apache.cxf.jaxws.JaxWsProxyFactoryBean factory)
Create port object- Parameters:
factory
- JAXWS proxy factory bean- Returns:
- Port object
-
initializeEndpointClient
protected void initializeEndpointClient(org.apache.cxf.endpoint.Client endpointClient)
Initialize endpoint client- Parameters:
endpointClient
- Endpoint client
-
addInterceptors
protected void addInterceptors(org.apache.cxf.endpoint.Client endpointClient)
Add interceptors (e.g. for request/response logging)- Parameters:
endpointClient
- Endpoint client
-
initializeHttpConduit
protected void initializeHttpConduit(org.apache.cxf.transport.http.HTTPConduit httpConduit) throws IOException, GeneralSecurityException
Initialize HTTP conduit- Parameters:
httpConduit
- HTTP conduit- Throws:
GeneralSecurityException
- security exceptionIOException
- I/O exception
-
createClientFactoryBean
public org.apache.cxf.frontend.ClientFactoryBean createClientFactoryBean()
Get JAX-WS client factory bean instance.- Returns:
- Client factory bean.
-
getConnectTimeout
public final int getConnectTimeout()
- Returns:
- Connection timeout in ms.
-
setConnectTimeout
public final void setConnectTimeout(int value)
- Parameters:
value
- Connection timeout in ms.
-
getSocketTimeout
public final int getSocketTimeout()
- Returns:
- Response timeout in ms.
-
setSocketTimeout
public final void setSocketTimeout(int value)
- Parameters:
value
- Response timeout in ms.
-
getHttpUser
public final String getHttpUser()
- Returns:
- Http basic authentication user.
-
setHttpUser
public final void setHttpUser(String value)
- Parameters:
value
- Http basic authentication user.
-
getHttpPassword
public final String getHttpPassword()
- Returns:
- Http basic authentication password
-
setHttpPassword
public final void setHttpPassword(String value)
- Parameters:
value
- Http basic authentication password
-
getProxyHost
public final String getProxyHost()
- Returns:
- Proxy host name
-
setProxyHost
public final void setProxyHost(String value)
- Parameters:
value
- Proxy host name
-
getProxyPort
public final int getProxyPort()
- Returns:
- Proxy port
-
setProxyPort
public final void setProxyPort(int value)
- Parameters:
value
- Proxy port
-
getProxyUser
public final String getProxyUser()
- Returns:
- Proxy user name
-
setProxyUser
public final void setProxyUser(String value)
- Parameters:
value
- Proxy user name
-
getProxyPassword
public final String getProxyPassword()
- Returns:
- Proxy password
-
setProxyPassword
public final void setProxyPassword(String value)
- Parameters:
value
- Proxy password
-
getSslContextType
public final String getSslContextType()
- Returns:
- SSL context type (default: TLS)
-
setSslContextType
public final void setSslContextType(String value)
- Parameters:
value
- SSL context type (default: TLS)
-
getKeyManagerType
public final String getKeyManagerType()
- Returns:
- Key manager type (default: SunX509)
-
setKeyManagerType
public final void setKeyManagerType(String value)
- Parameters:
value
- Key manager type (default: SunX509)
-
getKeyStoreType
public final String getKeyStoreType()
- Returns:
- Key store type (default: PKCS12)
-
setKeyStoreType
public final void setKeyStoreType(String value)
- Parameters:
value
- Key store type (default: PKCS12)
-
getKeyStoreProvider
public String getKeyStoreProvider()
- Returns:
- Key store provider (default: null = use first matching security provider)
-
setKeyStoreProvider
public void setKeyStoreProvider(String value)
- Parameters:
value
- Key store provider (default: null = use first matching security provider)
-
getKeyStorePath
public final String getKeyStorePath()
- Returns:
- Key store file path
-
setKeyStorePath
public final void setKeyStorePath(String value)
- Parameters:
value
- Key store file path
-
getKeyStorePassword
public final String getKeyStorePassword()
- Returns:
- Key store password
-
setKeyStorePassword
public final void setKeyStorePassword(String value)
- Parameters:
value
- Key store password
-
getTrustManagerType
public final String getTrustManagerType()
- Returns:
- Trust manager type (default: SunX509)
-
setTrustManagerType
public final void setTrustManagerType(String value)
- Parameters:
value
- Trust manager type (default: SunX509)
-
getTrustStoreType
public final String getTrustStoreType()
- Returns:
- Trust store type (default: JKS)
-
setTrustStoreType
public final void setTrustStoreType(String value)
- Parameters:
value
- Trust store type (default: JKS)
-
getTrustStoreProvider
public String getTrustStoreProvider()
- Returns:
- Trust store provider (default: null = use first matching security provider)
-
setTrustStoreProvider
public void setTrustStoreProvider(String value)
- Parameters:
value
- Trust store provider (default: null = use first matching security provider)
-
getTrustStorePath
public final String getTrustStorePath()
- Returns:
- Trust store file path
-
setTrustStorePath
public final void setTrustStorePath(String value)
- Parameters:
value
- Trust store file path
-
getTrustStorePassword
public final String getTrustStorePassword()
- Returns:
- Trust store password
-
setTrustStorePassword
public final void setTrustStorePassword(String vaule)
- Parameters:
vaule
- Trust store password
-
getTLSClientParameters
public final org.apache.cxf.configuration.jsse.TLSClientParameters getTLSClientParameters() throws IOException, GeneralSecurityException
Create TLS client parameters based on given certstore path/password parameters. Caches the parameter in member variable of this factory.- Returns:
- TLS client parameters
- Throws:
IOException
- I/O exceptionGeneralSecurityException
- General security exception
-
setTLSClientParameters
public final void setTLSClientParameters(org.apache.cxf.configuration.jsse.TLSClientParameters value)
- Parameters:
value
- CXF TSL client parameters
-
getWSAddressingToUri
public final String getWSAddressingToUri()
- Returns:
- Addressing-To URI to be sent as WS-Adressing header
-
setWSAddressingToUri
public final void setWSAddressingToUri(String value)
- Parameters:
value
- Addressing-To URI to be sent as WS-Adressing header
-
isIgnoreUnexpectedElements
public final boolean isIgnoreUnexpectedElements()
- Returns:
- If true compatibility mode for WSDL/schema changes is activated. If the SOAP server returns unknown XML element they are ignored during validation.
-
setIgnoreUnexpectedElements
public final void setIgnoreUnexpectedElements(boolean value)
- Parameters:
value
- If true compatibility mode for WSDL/schema changes is activated. If the SOAP server returns unknown XML element they are ignored during validation.
-
isAllowChunking
public final boolean isAllowChunking()
- Returns:
- Allow HTTP 1.1 chunking
-
setAllowChunking
public final void setAllowChunking(boolean value)
- Parameters:
value
- Allow HTTP 1.1 chunking
-
-