You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/01/31 12:34:26 UTC
camel git commit: CAMEL-10771: check endpoint/port and service names
via getter instead of instance variables
Repository: camel
Updated Branches:
refs/heads/camel-2.17.x 93ff5bd7e -> 019aa06ee
CAMEL-10771: check endpoint/port and service names via getter instead of
instance variables
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/019aa06e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/019aa06e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/019aa06e
Branch: refs/heads/camel-2.17.x
Commit: 019aa06ee2bbf15fdb676f7b1faf377526785460
Parents: 93ff5bd
Author: jochenr <jo...@users.noreply.github.com>
Authored: Tue Jan 31 11:41:30 2017 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Jan 31 13:29:46 2017 +0100
----------------------------------------------------------------------
.../apache/camel/component/cxf/CxfEndpoint.java | 68 ++++++++++----------
1 file changed, 34 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/019aa06e/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
index a487cd1..c3506cd 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
@@ -263,7 +263,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
sfb.setInInterceptors(in);
sfb.setOutInterceptors(out);
sfb.setOutFaultInterceptors(outFault);
- sfb.setInFaultInterceptors(inFault);
+ sfb.setInFaultInterceptors(inFault);
sfb.setFeatures(features);
if (schemaLocations != null) {
sfb.setSchemaLocations(schemaLocations);
@@ -271,15 +271,15 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
if (bindingConfig != null) {
sfb.setBindingConfig(bindingConfig);
}
-
+
if (dataBinding != null) {
sfb.setDataBinding(dataBinding);
}
-
+
if (serviceFactoryBean != null) {
setServiceFactory(sfb, serviceFactoryBean);
}
-
+
if (sfb instanceof JaxWsServerFactoryBean && handlers != null) {
((JaxWsServerFactoryBean)sfb).setHandlers(handlers);
}
@@ -289,7 +289,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
if (getBindingId() != null) {
sfb.setBindingId(getBindingId());
}
-
+
// wsdl url
if (getWsdlURL() != null) {
sfb.setWsdlURL(getWsdlURL());
@@ -356,14 +356,14 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
}
if (this.isSkipPayloadMessagePartCheck()) {
if (sfb.getProperties() == null) {
- sfb.setProperties(new HashMap<String, Object>());
+ sfb.setProperties(new HashMap<String, Object>());
}
sfb.getProperties().put("soap.no.validate.parts", Boolean.TRUE);
}
-
+
if (this.isSkipFaultLogging()) {
if (sfb.getProperties() == null) {
- sfb.setProperties(new HashMap<String, Object>());
+ sfb.setProperties(new HashMap<String, Object>());
}
sfb.getProperties().put(FaultListener.class.getName(), new NullFaultListener());
}
@@ -415,7 +415,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
for (Method m : cf.getClass().getMethods()) {
if ("setServiceFactory".equals(m.getName())) {
try {
- // Set Object class as the service class of WSDLServiceFactoryBean
+ // Set Object class as the service class of WSDLServiceFactoryBean
ReflectionUtil.setAccessible(m).invoke(cf, new WSDLServiceFactoryBean(Object.class));
} catch (Exception e) {
throw new RuntimeException(e);
@@ -425,7 +425,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
return cf;
}
- protected void setupHandlers(ClientFactoryBean factoryBean, Client client)
+ protected void setupHandlers(ClientFactoryBean factoryBean, Client client)
throws Exception {
if (factoryBean instanceof JaxWsClientFactoryBean && handlers != null) {
@@ -473,15 +473,15 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
factoryBean.setFeatures(features);
factoryBean.setTransportId(transportId);
factoryBean.setBindingId(bindingId);
-
+
if (bindingConfig != null) {
factoryBean.setBindingConfig(bindingConfig);
}
-
+
if (dataBinding != null) {
factoryBean.setDataBinding(dataBinding);
}
-
+
if (serviceFactoryBean != null) {
setServiceFactory(factoryBean, serviceFactoryBean);
}
@@ -530,7 +530,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
if (getWrappedStyle() != null) {
setWrapped(factoryBean, getWrappedStyle());
}
-
+
// any optional properties
if (getProperties() != null) {
if (factoryBean.getProperties() != null) {
@@ -541,7 +541,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
}
LOG.debug("ClientFactoryBean: {} added properties: {}", factoryBean, getProperties());
}
-
+
// setup the basic authentication property
if (ObjectHelper.isNotEmpty(username)) {
AuthorizationPolicy authPolicy = new AuthorizationPolicy();
@@ -552,17 +552,17 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
}
factoryBean.getProperties().put(AuthorizationPolicy.class.getName(), authPolicy);
}
-
+
if (this.isSkipPayloadMessagePartCheck()) {
if (factoryBean.getProperties() == null) {
- factoryBean.setProperties(new HashMap<String, Object>());
+ factoryBean.setProperties(new HashMap<String, Object>());
}
factoryBean.getProperties().put("soap.no.validate.parts", Boolean.TRUE);
}
-
+
if (this.isSkipFaultLogging()) {
if (factoryBean.getProperties() == null) {
- factoryBean.setProperties(new HashMap<String, Object>());
+ factoryBean.setProperties(new HashMap<String, Object>());
}
factoryBean.getProperties().put(FaultListener.class.getName(), new NullFaultListener());
}
@@ -632,8 +632,8 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
} else {
// create the client without service class
- checkName(portName, "endpoint/port name");
- checkName(serviceName, "service name");
+ checkName(getPortName(), "endpoint/port name");
+ checkName(getServiceName(), "service name");
ClientFactoryBean factoryBean = createClientFactoryBean();
// setup client factory bean
@@ -657,14 +657,14 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
if (getDataFormat() == DataFormat.POJO) {
ObjectHelper.notNull(getServiceClass(), CxfConstants.SERVICE_CLASS);
}
-
+
if (getWsdlURL() == null && getServiceClass() == null) {
// no WSDL and serviceClass specified, set our default serviceClass
if (getDataFormat().equals(DataFormat.PAYLOAD)) {
setServiceClass(org.apache.camel.component.cxf.DefaultPayloadProviderSEI.class.getName());
}
}
-
+
if (getServiceClass() != null) {
cls = getServiceClass();
}
@@ -816,7 +816,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
if (definition.getServices().size() == 1) {
serviceName = (QName) definition.getServices().keySet()
.iterator().next();
-
+
}
} catch (WSDLException e) {
throw new RuntimeException(e);
@@ -1019,7 +1019,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public Map<String, Object> getProperties() {
return properties;
}
-
+
public void setCamelContext(CamelContext c) {
super.setCamelContext(c);
if (this.properties != null) {
@@ -1108,7 +1108,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public boolean isMtomEnabled() {
return mtomEnabled;
}
-
+
public String getPassword() {
return password;
}
@@ -1119,7 +1119,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public void setPassword(String password) {
this.password = password;
}
-
+
public String getUsername() {
return username;
}
@@ -1198,7 +1198,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
} else {
headerListOfRequestContxt.addAll(headerListOfPayload);
}
- }
+ }
} else {
super.setParameters(params, message);
}
@@ -1245,7 +1245,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
return null;
}
}
-
+
public List<Interceptor<? extends Message>> getOutFaultInterceptors() {
return outFault;
@@ -1278,7 +1278,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public void setOutFaultInterceptors(List<Interceptor<? extends Message>> interceptors) {
outFault = interceptors;
}
-
+
public void setFeatures(List<Feature> f) {
features = f;
}
@@ -1286,7 +1286,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public List<Feature> getFeatures() {
return features;
}
-
+
@SuppressWarnings("rawtypes")
public void setHandlers(List<Handler> h) {
handlers = h;
@@ -1296,7 +1296,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public List<Handler> getHandlers() {
return handlers;
}
-
+
public void setSchemaLocations(List<String> sc) {
schemaLocations = sc;
}
@@ -1312,7 +1312,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public void setTransportId(String transportId) {
this.transportId = transportId;
}
-
+
public String getBindingId() {
return resolvePropertyPlaceholders(bindingId);
}
@@ -1323,7 +1323,7 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
public void setBindingId(String bindingId) {
this.bindingId = bindingId;
}
-
+
public BindingConfiguration getBindingConfig() {
return bindingConfig;
}