You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/02/14 09:49:23 UTC
[18/51] [partial] cxf git commit: Remove all trailing whitespaces
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
index 3fb3323..4190702 100644
--- a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
+++ b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
@@ -44,7 +44,7 @@ import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
/**
- *
+ *
*/
@Command(scope = "cxf", name = "list-endpoints",
description = "Lists all CXF Endpoints on a Bus.")
@@ -52,13 +52,13 @@ import org.osgi.service.cm.ConfigurationAdmin;
public class ListEndpointsCommand extends CXFController implements Action {
protected static final String HEADER_FORMAT = "%-25s %-10s %-60s %-40s";
protected static final String OUTPUT_FORMAT = "[%-23s] [%-8s] [%-58s] [%-38s]";
-
+
@Argument(index = 0, name = "bus",
- description = "The CXF bus name where to look for the Endpoints",
+ description = "The CXF bus name where to look for the Endpoints",
required = false, multiValued = false)
@Completion(BusCompleter.class)
String name;
-
+
@Option(name = "-f", aliases = {"--fulladdress" },
description = "Display full address of an endpoint ", required = false, multiValued = false)
boolean fullAddress;
@@ -108,7 +108,7 @@ public class ListEndpointsCommand extends CXFController implements Action {
table.print(System.out, !noFormat);
return null;
}
-
+
private String toFullAddress(String address) throws IOException, InvalidSyntaxException {
ConfigurationAdmin configAdmin = getConfigAdmin();
if (address.startsWith("/") && configAdmin != null) {
@@ -129,7 +129,7 @@ public class ListEndpointsCommand extends CXFController implements Action {
return address;
}
- private String extractConfigProperty(ConfigurationAdmin configAdmin,
+ private String extractConfigProperty(ConfigurationAdmin configAdmin,
String pid, String propertyName) throws IOException,
InvalidSyntaxException {
String ret = null;
@@ -145,17 +145,17 @@ public class ListEndpointsCommand extends CXFController implements Action {
private String getCXFOSGiServletContext() throws InvalidSyntaxException {
String ret = null;
- String filter = "(&(" + "objectclass=" + "javax.servlet.Servlet"
+ String filter = "(&(" + "objectclass=" + "javax.servlet.Servlet"
+ ")(servlet-name=cxf-osgi-transport-servlet))";
ServiceReference ref = getBundleContext().getServiceReferences(null, filter)[0];
-
+
if (ref != null) {
ret = (String)ref.getProperty("alias");
- }
-
+ }
+
return ret;
-
+
}
private String getHttpOSGiServicePort() throws InvalidSyntaxException {
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StartEndpointCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StartEndpointCommand.java b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StartEndpointCommand.java
index d2bf6be..2d60d9b 100644
--- a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StartEndpointCommand.java
+++ b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StartEndpointCommand.java
@@ -34,21 +34,21 @@ import org.apache.karaf.shell.api.action.Completion;
import org.apache.karaf.shell.api.action.lifecycle.Service;
/**
- *
+ *
*/
@Command(scope = "cxf", name = "start-endpoint",
description = "Starts a CXF Endpoint on a Bus.")
@Service
public class StartEndpointCommand extends CXFController implements Action {
-
- @Argument(index = 0, name = "bus",
- description = "The CXF bus name where to look for the Endpoint",
+
+ @Argument(index = 0, name = "bus",
+ description = "The CXF bus name where to look for the Endpoint",
required = true, multiValued = false)
@Completion(BusCompleter.class)
String busName;
-
+
@Argument(index = 1, name = "endpoint",
- description = "The Endpoint name to start",
+ description = "The Endpoint name to start",
required = true, multiValued = false)
@Completion(StoppedEndpointCompleter.class)
String endpoint;
@@ -64,5 +64,5 @@ public class StartEndpointCommand extends CXFController implements Action {
}
}
return null;
- }
+ }
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StopEndpointCommand.java
----------------------------------------------------------------------
diff --git a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StopEndpointCommand.java b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StopEndpointCommand.java
index 9ffdbf9..cbd56a8 100644
--- a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StopEndpointCommand.java
+++ b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/StopEndpointCommand.java
@@ -34,21 +34,21 @@ import org.apache.karaf.shell.api.action.Completion;
import org.apache.karaf.shell.api.action.lifecycle.Service;
/**
- *
+ *
*/
@Command(scope = "cxf", name = "stop-endpoint",
description = "Stops a CXF Endpoint on a Bus.")
@Service
public class StopEndpointCommand extends CXFController implements Action {
-
+
@Argument(index = 0, name = "bus",
- description = "The CXF bus name where to look for the Endpoint",
+ description = "The CXF bus name where to look for the Endpoint",
required = true, multiValued = false)
@Completion(BusCompleter.class)
String busName;
-
- @Argument(index = 1, name = "endpoint",
- description = "The Endpoint name to stop",
+
+ @Argument(index = 1, name = "endpoint",
+ description = "The Endpoint name to stop",
required = true, multiValued = false)
@Completion(StartedEndpointCompleter.class)
String endpoint;
@@ -64,5 +64,5 @@ public class StopEndpointCommand extends CXFController implements Action {
}
}
return null;
- }
+ }
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/BusCompleter.java
----------------------------------------------------------------------
diff --git a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/BusCompleter.java b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/BusCompleter.java
index 47217e1..3d5cf76 100644
--- a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/BusCompleter.java
+++ b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/BusCompleter.java
@@ -31,7 +31,7 @@ import org.apache.karaf.shell.support.completers.StringsCompleter;
@Service
public class BusCompleter extends CXFController implements Completer {
-
+
@Override
public int complete(Session session,
CommandLine commandLine,
@@ -39,11 +39,11 @@ public class BusCompleter extends CXFController implements Completer {
StringsCompleter delegate = new StringsCompleter();
try {
List<Bus> busses = getBusses();
-
+
for (Bus bus : busses) {
delegate.getStrings().add(bus.getId());
}
-
+
} catch (Exception e) {
// Ignore
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/EndpointCompleterSupport.java
----------------------------------------------------------------------
diff --git a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/EndpointCompleterSupport.java b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/EndpointCompleterSupport.java
index 463a5ad..aaeab22 100644
--- a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/EndpointCompleterSupport.java
+++ b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/EndpointCompleterSupport.java
@@ -38,11 +38,11 @@ public abstract class EndpointCompleterSupport extends CXFController implements
StringsCompleter delegate = new StringsCompleter();
try {
List<Bus> busses = getBusses();
-
+
for (Bus b : busses) {
ServerRegistry reg = b.getExtension(ServerRegistry.class);
List<Server> servers = reg.getServers();
-
+
for (Server serv : servers) {
if (acceptsFeature(serv)) {
String qname = serv.getEndpoint().getEndpointInfo().getName().getLocalPart();
@@ -50,13 +50,13 @@ public abstract class EndpointCompleterSupport extends CXFController implements
}
}
}
-
+
} catch (Exception e) {
// Ignore
}
return delegate.complete(session, commandLine, list);
}
-
+
/**
* Method for filtering endpoint.
*
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/StoppedEndpointCompleter.java
----------------------------------------------------------------------
diff --git a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/StoppedEndpointCompleter.java b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/StoppedEndpointCompleter.java
index fb53ae7..dd5d823 100644
--- a/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/StoppedEndpointCompleter.java
+++ b/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/completers/StoppedEndpointCompleter.java
@@ -25,7 +25,7 @@ import org.apache.karaf.shell.api.action.lifecycle.Service;
@Service
public class StoppedEndpointCompleter extends EndpointCompleterSupport {
-
+
@Override
protected boolean acceptsFeature(Server server) {
return !server.isStarted();
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocInInterceptor.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocInInterceptor.java
index 8eea8bd..bb61a6b 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocInInterceptor.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocInInterceptor.java
@@ -39,10 +39,10 @@ import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.cxf.service.model.MessageInfo;
public class ColocInInterceptor extends AbstractPhaseInterceptor<Message> {
-
+
private static final Logger LOG = LogUtils.getL7dLogger(ColocInInterceptor.class);
-
+
public ColocInInterceptor() {
super(Phase.INVOKE);
addAfter(ServiceInvokerInterceptor.class.getName());
@@ -69,7 +69,7 @@ public class ColocInInterceptor extends AbstractPhaseInterceptor<Message> {
BindingOperationInfo boi = ex.getBindingOperationInfo();
Message outBound = ex.getOutMessage();
if (boi != null) {
- outBound.put(MessageInfo.class,
+ outBound.put(MessageInfo.class,
boi.getOperationInfo().getOutput());
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocMessageObserver.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocMessageObserver.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocMessageObserver.java
index 2cccd28..dd31eaf 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocMessageObserver.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocMessageObserver.java
@@ -71,14 +71,14 @@ public class ColocMessageObserver extends ChainInitiationObserver {
}
Exchange ex = new ExchangeImpl();
setExchangeProperties(ex, m);
-
+
Message inMsg = endpoint.getBinding().createMessage();
MessageImpl.copyContent(m, inMsg);
-
+
//Copy Request Context to Server inBound Message
- //TODO a Context Filter Strategy required.
+ //TODO a Context Filter Strategy required.
inMsg.putAll(m);
-
+
inMsg.put(COLOCATED, Boolean.TRUE);
inMsg.put(Message.REQUESTOR_ROLE, Boolean.FALSE);
inMsg.put(Message.INBOUND_MESSAGE, Boolean.TRUE);
@@ -89,27 +89,27 @@ public class ColocMessageObserver extends ChainInitiationObserver {
}
ex.setInMessage(inMsg);
inMsg.setExchange(ex);
-
+
if (LOG.isLoggable(Level.FINEST)) {
LOG.finest("Build inbound interceptor chain.");
}
-
+
//Add all interceptors between USER_LOGICAL and INVOKE.
SortedSet<Phase> phases = new TreeSet<Phase>(bus.getExtension(PhaseManager.class).getInPhases());
ColocUtil.setPhases(phases, Phase.USER_LOGICAL, Phase.INVOKE);
InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, phases);
chain.add(addColocInterceptors());
inMsg.setInterceptorChain(chain);
-
+
//Convert the coloc object type if necessary
BindingOperationInfo bop = m.getExchange().getBindingOperationInfo();
OperationInfo soi = bop != null ? bop.getOperationInfo() : null;
if (soi != null && oi != null) {
- if (ColocUtil.isAssignableOperationInfo(soi, Source.class)
+ if (ColocUtil.isAssignableOperationInfo(soi, Source.class)
&& !ColocUtil.isAssignableOperationInfo(oi, Source.class)) {
// converting source -> pojo
ColocUtil.convertSourceToObject(inMsg);
- } else if (ColocUtil.isAssignableOperationInfo(oi, Source.class)
+ } else if (ColocUtil.isAssignableOperationInfo(oi, Source.class)
&& !ColocUtil.isAssignableOperationInfo(soi, Source.class)) {
// converting pojo -> source
ColocUtil.convertObjectToSource(inMsg);
@@ -117,12 +117,12 @@ public class ColocMessageObserver extends ChainInitiationObserver {
}
chain.doIntercept(inMsg);
if (soi != null && oi != null) {
- if (ColocUtil.isAssignableOperationInfo(soi, Source.class)
+ if (ColocUtil.isAssignableOperationInfo(soi, Source.class)
&& !ColocUtil.isAssignableOperationInfo(oi, Source.class)
&& ex.getOutMessage() != null) {
- // converting pojo -> source
+ // converting pojo -> source
ColocUtil.convertObjectToSource(ex.getOutMessage());
- } else if (ColocUtil.isAssignableOperationInfo(oi, Source.class)
+ } else if (ColocUtil.isAssignableOperationInfo(oi, Source.class)
&& !ColocUtil.isAssignableOperationInfo(soi, Source.class)
&& ex.getOutMessage() != null) {
// converting pojo -> source
@@ -140,7 +140,7 @@ public class ColocMessageObserver extends ChainInitiationObserver {
}
}
}
-
+
protected void setOutBoundMessage(Exchange from, Exchange to) {
if (from.getOutFaultMessage() != null) {
to.setInFaultMessage(from.getOutFaultMessage());
@@ -148,7 +148,7 @@ public class ColocMessageObserver extends ChainInitiationObserver {
to.setInMessage(from.getOutMessage());
}
}
-
+
protected void setExchangeProperties(Exchange exchange, Message m) {
exchange.put(Bus.class, bus);
exchange.put(Endpoint.class, endpoint);
@@ -162,10 +162,10 @@ public class ColocMessageObserver extends ChainInitiationObserver {
if (boi != null && boi.isUnwrapped()) {
boi = boi.getWrappedOperation();
}
-
+
exchange.put(BindingOperationInfo.class, boi);
}
-
+
protected List<Interceptor<? extends Message>> addColocInterceptors() {
List<Interceptor<? extends Message>> list = new ArrayList<Interceptor<? extends Message>>();
list.add(new ColocInInterceptor());
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutFaultObserver.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutFaultObserver.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutFaultObserver.java
index c5272ee..7537a2c 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutFaultObserver.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutFaultObserver.java
@@ -32,7 +32,7 @@ public class ColocOutFaultObserver extends OutFaultChainInitiatorObserver {
public ColocOutFaultObserver(Bus bus) {
super(bus);
list = new TreeSet<Phase>(bus.getExtension(PhaseManager.class).getOutPhases());
- ColocUtil.setPhases(list, Phase.SETUP, Phase.USER_LOGICAL);
+ ColocUtil.setPhases(list, Phase.SETUP, Phase.USER_LOGICAL);
}
protected SortedSet<Phase> getPhases() {
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutInterceptor.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutInterceptor.java
index 34a5b45..7db48eb 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutInterceptor.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocOutInterceptor.java
@@ -54,8 +54,8 @@ public class ColocOutInterceptor extends AbstractPhaseInterceptor<Message> {
private static final Logger LOG = LogUtils.getL7dLogger(ClientImpl.class);
private static final String COLOCATED = Message.class.getName() + ".COLOCATED";
private MessageObserver colocObserver;
- private Bus bus;
-
+ private Bus bus;
+
public ColocOutInterceptor() {
super(Phase.POST_LOGICAL);
}
@@ -65,9 +65,9 @@ public class ColocOutInterceptor extends AbstractPhaseInterceptor<Message> {
}
public void setBus(Bus bus) {
- this.bus = bus;
+ this.bus = bus;
}
-
+
public void handleMessage(Message message) throws Fault {
if (bus == null) {
bus = message.getExchange().getBus();
@@ -78,30 +78,30 @@ public class ColocOutInterceptor extends AbstractPhaseInterceptor<Message> {
throw new Fault(new org.apache.cxf.common.i18n.Message("BUS_NOT_FOUND", BUNDLE));
}
}
-
+
ServerRegistry registry = bus.getExtension(ServerRegistry.class);
-
+
if (registry == null) {
throw new Fault(new org.apache.cxf.common.i18n.Message("SERVER_REGISTRY_NOT_FOUND", BUNDLE));
}
-
+
Exchange exchange = message.getExchange();
Endpoint senderEndpoint = exchange.getEndpoint();
if (senderEndpoint == null) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("ENDPOINT_NOT_FOUND",
+ throw new Fault(new org.apache.cxf.common.i18n.Message("ENDPOINT_NOT_FOUND",
BUNDLE));
}
BindingOperationInfo boi = exchange.getBindingOperationInfo();
-
+
if (boi == null) {
- throw new Fault(new org.apache.cxf.common.i18n.Message("OPERATIONINFO_NOT_FOUND",
+ throw new Fault(new org.apache.cxf.common.i18n.Message("OPERATIONINFO_NOT_FOUND",
BUNDLE));
}
Server srv = isColocated(registry.getServers(), senderEndpoint, boi);
-
+
if (srv != null) {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Operation:" + boi.getName() + " dispatched as colocated call.");
@@ -121,11 +121,11 @@ public class ColocOutInterceptor extends AbstractPhaseInterceptor<Message> {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Operation:" + boi.getName() + " dispatched as remote call.");
}
-
+
message.put(COLOCATED, Boolean.FALSE);
}
}
-
+
protected void invokeColocObserver(Message outMsg, Endpoint inboundEndpoint) {
if (colocObserver == null) {
colocObserver = new ColocMessageObserver(inboundEndpoint, bus);
@@ -141,40 +141,40 @@ public class ColocOutInterceptor extends AbstractPhaseInterceptor<Message> {
Message m = getInBoundMessage(ex);
Message inMsg = ep.getBinding().createMessage();
MessageImpl.copyContent(m, inMsg);
-
+
//Copy Response Context to Client inBound Message
- //TODO a Context Filter Strategy required.
+ //TODO a Context Filter Strategy required.
inMsg.putAll(m);
-
+
inMsg.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
inMsg.put(Message.INBOUND_MESSAGE, Boolean.TRUE);
inMsg.setExchange(ex);
-
+
Exception exc = inMsg.getContent(Exception.class);
if (exc != null) {
ex.setInFaultMessage(inMsg);
ColocInFaultObserver observer = new ColocInFaultObserver(bus);
- observer.onMessage(inMsg);
+ observer.onMessage(inMsg);
} else {
//Handle Response
ex.setInMessage(inMsg);
PhaseManager pm = bus.getExtension(PhaseManager.class);
SortedSet<Phase> phases = new TreeSet<Phase>(pm.getInPhases());
ColocUtil.setPhases(phases, Phase.USER_LOGICAL, Phase.PRE_INVOKE);
-
- InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, phases);
- inMsg.setInterceptorChain(chain);
+
+ InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, phases);
+ inMsg.setInterceptorChain(chain);
chain.doIntercept(inMsg);
}
ex.put(ClientImpl.FINISHED, Boolean.TRUE);
}
-
+
protected Message getInBoundMessage(Exchange ex) {
return (ex.getInFaultMessage() != null)
? ex.getInFaultMessage()
: ex.getInMessage();
}
-
+
protected void setMessageObserver(MessageObserver observer) {
colocObserver = observer;
}
@@ -191,26 +191,26 @@ public class ColocOutInterceptor extends AbstractPhaseInterceptor<Message> {
&& receiverEI.getName().equals(senderEI.getName())) {
//Check For Operation Match.
BindingOperationInfo receiverOI = receiverEI.getBinding().getOperation(boi.getName());
- if (receiverOI != null
+ if (receiverOI != null
&& isCompatibleOperationInfo(boi, receiverOI)) {
return s;
}
}
}
}
-
+
return null;
}
-
+
protected boolean isSameOperationInfo(BindingOperationInfo sender,
BindingOperationInfo receiver) {
- return ColocUtil.isSameOperationInfo(sender.getOperationInfo(),
+ return ColocUtil.isSameOperationInfo(sender.getOperationInfo(),
receiver.getOperationInfo());
}
protected boolean isCompatibleOperationInfo(BindingOperationInfo sender,
BindingOperationInfo receiver) {
- return ColocUtil.isCompatibleOperationInfo(sender.getOperationInfo(),
+ return ColocUtil.isCompatibleOperationInfo(sender.getOperationInfo(),
receiver.getOperationInfo());
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
index fd653ef..acdcacf 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
@@ -68,7 +68,7 @@ public final class ColocUtil {
boolean remove = true;
while (iter.hasNext()) {
Phase p = iter.next();
- if (remove
+ if (remove
&& p.getName().equals(startPhase.getName())) {
remove = false;
} else if (p.getName().equals(endPhase.getName())) {
@@ -78,11 +78,11 @@ public final class ColocUtil {
}
}
}
-
+
public static InterceptorChain getOutInterceptorChain(Exchange ex, SortedSet<Phase> phases) {
Bus bus = ex.getBus();
PhaseInterceptorChain chain = new PhaseInterceptorChain(phases);
-
+
Endpoint ep = ex.getEndpoint();
List<Interceptor<? extends Message>> il = ep.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
@@ -99,7 +99,7 @@ public final class ColocUtil {
LOG.fine("Interceptors contributed by bus: " + il);
}
chain.add(il);
-
+
if (ep.getService().getDataBinding() instanceof InterceptorProvider) {
il = ((InterceptorProvider)ep.getService().getDataBinding()).getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
@@ -111,11 +111,11 @@ public final class ColocUtil {
return chain;
}
-
+
public static InterceptorChain getInInterceptorChain(Exchange ex, SortedSet<Phase> phases) {
Bus bus = ex.getBus();
PhaseInterceptorChain chain = new PhaseInterceptorChain(phases);
-
+
Endpoint ep = ex.getEndpoint();
List<Interceptor<? extends Message>> il = ep.getInInterceptors();
if (LOG.isLoggable(Level.FINE)) {
@@ -132,7 +132,7 @@ public final class ColocUtil {
LOG.fine("Interceptors contributed by bus: " + il);
}
chain.add(il);
-
+
if (ep.getService().getDataBinding() instanceof InterceptorProvider) {
il = ((InterceptorProvider)ep.getService().getDataBinding()).getInInterceptors();
if (LOG.isLoggable(Level.FINE)) {
@@ -143,7 +143,7 @@ public final class ColocUtil {
chain.setFaultObserver(new ColocOutFaultObserver(bus));
modifyChain(chain, ex, true);
return chain;
- }
+ }
private static void modifyChain(PhaseInterceptorChain chain, Exchange ex, boolean in) {
modifyChain(chain, ex.getInMessage(), in);
modifyChain(chain, ex.getOutMessage(), in);
@@ -152,7 +152,7 @@ public final class ColocUtil {
if (m == null) {
return;
}
- Collection<InterceptorProvider> providers
+ Collection<InterceptorProvider> providers
= CastUtils.cast((Collection<?>)m.get(Message.INTERCEPTOR_PROVIDERS));
if (providers != null) {
for (InterceptorProvider p : providers) {
@@ -164,7 +164,7 @@ public final class ColocUtil {
}
}
String key = in ? Message.IN_INTERCEPTORS : Message.OUT_INTERCEPTORS;
- Collection<Interceptor<? extends Message>> is
+ Collection<Interceptor<? extends Message>> is
= CastUtils.cast((Collection<?>)m.get(key));
if (is != null) {
chain.add(is);
@@ -177,25 +177,25 @@ public final class ColocUtil {
&& isSameMessageInfo(oi1.getOutput(), oi2.getOutput())
&& isSameFaultInfo(oi1.getFaults(), oi2.getFaults());
}
-
+
public static boolean isCompatibleOperationInfo(OperationInfo oi1, OperationInfo oi2) {
return isSameOperationInfo(oi1, oi2)
- || isAssignableOperationInfo(oi1, Source.class)
+ || isAssignableOperationInfo(oi1, Source.class)
|| isAssignableOperationInfo(oi2, Source.class);
}
-
+
public static boolean isAssignableOperationInfo(OperationInfo oi, Class<?> cls) {
MessageInfo mi = oi.getInput();
List<MessagePartInfo> mpis = mi.getMessageParts();
return mpis.size() == 1 && cls.isAssignableFrom(mpis.get(0).getTypeClass());
}
-
+
public static boolean isSameMessageInfo(MessageInfo mi1, MessageInfo mi2) {
if ((mi1 == null && mi2 != null)
|| (mi1 != null && mi2 == null)) {
return false;
}
-
+
if (mi1 != null && mi2 != null) {
List<MessagePartInfo> mpil1 = mi1.getMessageParts();
List<MessagePartInfo> mpil2 = mi2.getMessageParts();
@@ -213,26 +213,26 @@ public final class ColocUtil {
}
return true;
}
-
- public static boolean isSameFaultInfo(Collection<FaultInfo> fil1,
+
+ public static boolean isSameFaultInfo(Collection<FaultInfo> fil1,
Collection<FaultInfo> fil2) {
if ((fil1 == null && fil2 != null)
|| (fil1 != null && fil2 == null)) {
return false;
}
-
+
if (fil1 != null && fil2 != null) {
if (fil1.size() != fil2.size()) {
return false;
}
for (FaultInfo fi1 : fil1) {
Iterator<FaultInfo> iter = fil2.iterator();
- Class<?> fiClass1 = fi1.getProperty(Class.class.getName(),
+ Class<?> fiClass1 = fi1.getProperty(Class.class.getName(),
Class.class);
boolean match = false;
while (iter.hasNext()) {
FaultInfo fi2 = iter.next();
- Class<?> fiClass2 = fi2.getProperty(Class.class.getName(),
+ Class<?> fiClass2 = fi2.getProperty(Class.class.getName(),
Class.class);
//Sender/Receiver Service Model not same for faults wr.t message names.
//So Compare Exception Class Instance.
@@ -242,13 +242,13 @@ public final class ColocUtil {
}
}
if (!match) {
- return false;
+ return false;
}
}
}
return true;
}
-
+
public static void convertSourceToObject(Message message) {
List<Object> content = CastUtils.cast(message.getContent(List.class));
if (content == null || content.size() < 1) {
@@ -286,7 +286,7 @@ public final class ColocUtil {
}
// only supporting the wrapped style for now (one pojo <-> one source)
Object object = content.get(0);
- DataWriter<OutputStream> writer =
+ DataWriter<OutputStream> writer =
message.getExchange().getService().getDataBinding().createWriter(OutputStream.class);
//TODO use a better conversion method to get a Source from a pojo.
ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -294,7 +294,7 @@ public final class ColocUtil {
content.set(0, new StreamSource(new ByteArrayInputStream(bos.toByteArray())));
}
-
+
private static MessageInfo getMessageInfo(Message message) {
OperationInfo oi = message.getExchange().getBindingOperationInfo().getOperationInfo();
if (MessageUtils.isOutbound(message)) {
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
index e6bfbf0..3f612c4 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
@@ -42,12 +42,12 @@ public class WebFaultInInterceptor extends AbstractPhaseInterceptor<Message> {
if (ex != null) {
message.put(Message.RESPONSE_CODE, Integer.valueOf(500));
}
-
+
if (ex instanceof Fault) {
Fault f = (Fault) ex;
ex = (Exception) f.getCause();
}
- if (ex == null) {
+ if (ex == null) {
return;
}
@@ -71,15 +71,15 @@ public class WebFaultInInterceptor extends AbstractPhaseInterceptor<Message> {
if (wf != null) {
faultName = new QName(wf.targetNamespace(), wf.name());
}
-
+
return faultName;
}
-
+
private MessagePartInfo getFaultMessagePart(QName qname, OperationInfo op) {
if (op.isUnwrapped() && (op instanceof UnwrappedOperationInfo)) {
op = ((UnwrappedOperationInfo)op).getWrappedOperation();
}
-
+
for (FaultInfo faultInfo : op.getFaults()) {
for (MessagePartInfo mpi : faultInfo.getMessageParts()) {
String ns = null;
@@ -88,13 +88,13 @@ public class WebFaultInInterceptor extends AbstractPhaseInterceptor<Message> {
} else {
ns = mpi.getTypeQName().getNamespaceURI();
}
- if (qname.getLocalPart().equals(mpi.getConcreteName().getLocalPart())
+ if (qname.getLocalPart().equals(mpi.getConcreteName().getLocalPart())
&& qname.getNamespaceURI().equals(ns)) {
return mpi;
}
}
-
+
}
return null;
- }
+ }
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/Activator.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/Activator.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/Activator.java
index f8a1097..cb24a76 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/Activator.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/Activator.java
@@ -30,7 +30,7 @@ public class Activator implements BundleActivator {
public void start(BundleContext context) throws Exception {
try {
BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {
-
+
@Override
public Object createNamespaceHandler() {
return new ColocBPNamespaceHandler();
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
index 153df02..c943f4f 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
@@ -38,7 +38,7 @@ public class ColocFeature extends AbstractFeature {
client.setConduitSelector(selector);
initializeProvider(client, bus);
}
-
+
@Override
protected void initializeProvider(InterceptorProvider provider, Bus bus) {
provider.getInInterceptors().add(new ColocInInterceptor());
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocMessageObserverTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocMessageObserverTest.java b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocMessageObserverTest.java
index 7cbc32d..17c46fe 100644
--- a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocMessageObserverTest.java
+++ b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocMessageObserverTest.java
@@ -59,7 +59,7 @@ public class ColocMessageObserverTest extends Assert {
ep = control.createMock(Endpoint.class);
bus = control.createMock(Bus.class);
srv = control.createMock(Service.class);
- BusFactory.setDefaultBus(bus);
+ BusFactory.setDefaultBus(bus);
msg = new MessageImpl();
ex = new ExchangeImpl();
//msg.setExchange(ex);
@@ -73,7 +73,7 @@ public class ColocMessageObserverTest extends Assert {
@Test
public void testSetExchangeProperties() throws Exception {
QName opName = new QName("A", "B");
- msg.put(Message.WSDL_OPERATION, opName);
+ msg.put(Message.WSDL_OPERATION, opName);
EasyMock.expect(ep.getService()).andReturn(srv);
Binding binding = control.createMock(Binding.class);
EasyMock.expect(ep.getBinding()).andReturn(binding);
@@ -104,10 +104,10 @@ public class ColocMessageObserverTest extends Assert {
@Test
public void testObserverOnMessage() throws Exception {
msg.setExchange(ex);
-
+
Binding binding = control.createMock(Binding.class);
EasyMock.expect(ep.getBinding()).andReturn(binding);
-
+
Message inMsg = new MessageImpl();
EasyMock.expect(binding.createMessage()).andReturn(inMsg);
@@ -136,18 +136,18 @@ public class ColocMessageObserverTest extends Assert {
Exchange ex1 = msg.getExchange();
assertNotNull("Exchange should be set", ex1);
}
-
+
class TestColocMessageObserver extends ColocMessageObserver {
TestColocMessageObserver(Endpoint endpoint, Bus bus) {
super(endpoint, bus);
}
-
+
public void setExchangeProperties(Exchange exchange, Message m) {
exchange.put(Bus.class, bus);
exchange.put(Endpoint.class, ep);
exchange.put(Service.class, srv);
}
-
+
protected List<Interceptor<? extends Message>> addColocInterceptors() {
return new ArrayList<Interceptor<? extends Message>>();
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocOutInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocOutInterceptorTest.java b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocOutInterceptorTest.java
index 0e8c670..d0ed656 100644
--- a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocOutInterceptorTest.java
+++ b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocOutInterceptorTest.java
@@ -68,7 +68,7 @@ public class ColocOutInterceptorTest extends Assert {
public ColocOutInterceptorTest() {
control.makeThreadSafe(true);
}
-
+
@Before
public void setUp() throws Exception {
colocOut = new ColocOutInterceptor();
@@ -163,7 +163,7 @@ public class ColocOutInterceptorTest extends Assert {
@Test
public void testColocOutIsColocatedPropertySet() throws Exception {
colocOut = new TestColocOutInterceptor1();
-
+
Bus bus = setupBus();
ServerRegistry sr = control.createMock(ServerRegistry.class);
EasyMock.expect(bus.getExtension(ServerRegistry.class)).andReturn(sr);
@@ -171,7 +171,7 @@ public class ColocOutInterceptorTest extends Assert {
//Funtion Param
Server s1 = control.createMock(Server.class);
List<Server> list = new ArrayList<>();
- list.add(s1);
+ list.add(s1);
Endpoint sep = control.createMock(Endpoint.class);
ex.put(Endpoint.class, sep);
QName op = new QName("E", "F");
@@ -187,7 +187,7 @@ public class ColocOutInterceptorTest extends Assert {
OperationInfo roi = rii.getOperation(op);
BindingOperationInfo sboi = control.createMock(BindingOperationInfo.class);
BindingOperationInfo rboi = control.createMock(BindingOperationInfo.class);
-
+
ex.put(BindingOperationInfo.class, sboi);
//Local var
Service ses = control.createMock(Service.class);
@@ -197,7 +197,7 @@ public class ColocOutInterceptorTest extends Assert {
Service res = control.createMock(Service.class);
BindingInfo rbi = control.createMock(BindingInfo.class);
EndpointInfo rei = control.createMock(EndpointInfo.class);
-
+
EasyMock.expect(sr.getServers()).andReturn(list);
EasyMock.expect(sep.getService()).andReturn(ses);
EasyMock.expect(sep.getEndpointInfo()).andReturn(sei);
@@ -220,7 +220,7 @@ public class ColocOutInterceptorTest extends Assert {
msg.setInterceptorChain(chain);
EasyMock.expect(sboi.getBinding()).andReturn(sbi);
EasyMock.expect(sbi.getInterface()).andReturn(sii);
-
+
control.replay();
colocOut.handleMessage(msg);
assertEquals("COLOCATED property should be set",
@@ -229,10 +229,10 @@ public class ColocOutInterceptorTest extends Assert {
op, msg.get(Message.WSDL_OPERATION));
assertEquals("Message.WSDL_INTERFACE property should be set",
intf, msg.get(Message.WSDL_INTERFACE));
-
- control.verify();
+
+ control.verify();
}
-
+
@Test
public void testInvokeInboundChain() {
//Reset Exchange on msg
@@ -249,7 +249,7 @@ public class ColocOutInterceptorTest extends Assert {
ex.put(Bus.class, bus);
ex.put(Endpoint.class, ep);
ex.put(Service.class, srv);
-
+
EasyMock.expect(ep.getBinding()).andReturn(bd);
EasyMock.expect(bd.createMessage()).andReturn(new MessageImpl());
EasyMock.expect(ep.getInInterceptors())
@@ -259,7 +259,7 @@ public class ColocOutInterceptorTest extends Assert {
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
EasyMock.expect(bus.getInInterceptors())
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
-
+
control.replay();
colocOut.invokeInboundChain(ex, ep);
Message inMsg = ex.getInMessage();
@@ -274,7 +274,7 @@ public class ColocOutInterceptorTest extends Assert {
Boolean.TRUE, ex.get(ClientImpl.FINISHED));
control.verify();
}
-
+
private void verifyIsColocatedWithNullList() {
Server val = colocOut.isColocated(null, null, null);
assertEquals("Is not a colocated call",
@@ -292,7 +292,7 @@ public class ColocOutInterceptorTest extends Assert {
EasyMock.expect(sep.getService()).andReturn(ses);
EasyMock.expect(sep.getEndpointInfo()).andReturn(sei);
-
+
control.replay();
Server val = colocOut.isColocated(list, sep, null);
assertEquals("Is not a colocated call",
@@ -305,7 +305,7 @@ public class ColocOutInterceptorTest extends Assert {
//Funtion Param
Server s1 = control.createMock(Server.class);
List<Server> list = new ArrayList<>();
- list.add(s1);
+ list.add(s1);
Endpoint sep = control.createMock(Endpoint.class);
//Local var
Service ses = control.createMock(Service.class);
@@ -318,7 +318,7 @@ public class ColocOutInterceptorTest extends Assert {
EasyMock.expect(rep.getService()).andReturn(res);
EasyMock.expect(ses.getName()).andReturn(new QName("A", "C"));
EasyMock.expect(res.getName()).andReturn(new QName("A", "B"));
-
+
control.replay();
Server val = colocOut.isColocated(list, sep, null);
assertEquals("Is not a colocated call",
@@ -331,7 +331,7 @@ public class ColocOutInterceptorTest extends Assert {
//Funtion Param
Server s1 = control.createMock(Server.class);
List<Server> list = new ArrayList<>();
- list.add(s1);
+ list.add(s1);
Endpoint sep = control.createMock(Endpoint.class);
BindingOperationInfo sboi = control.createMock(BindingOperationInfo.class);
//Local var
@@ -351,7 +351,7 @@ public class ColocOutInterceptorTest extends Assert {
EasyMock.expect(res.getName()).andReturn(new QName("A", "B"));
EasyMock.expect(rei.getName()).andReturn(new QName("C", "D"));
EasyMock.expect(sei.getName()).andReturn(new QName("C", "E"));
-
+
control.replay();
Server val = colocOut.isColocated(list, sep, sboi);
assertEquals("Is not a colocated call",
@@ -364,13 +364,13 @@ public class ColocOutInterceptorTest extends Assert {
//Funtion Param
Server s1 = control.createMock(Server.class);
List<Server> list = new ArrayList<>();
- list.add(s1);
+ list.add(s1);
Endpoint sep = control.createMock(Endpoint.class);
BindingOperationInfo sboi = control.createMock(BindingOperationInfo.class);
//Local var
Service ses = control.createMock(Service.class);
ServiceInfo ssi = control.createMock(ServiceInfo.class);
- EndpointInfo sei = control.createMock(EndpointInfo.class);
+ EndpointInfo sei = control.createMock(EndpointInfo.class);
TestBindingInfo rbi = new TestBindingInfo(ssi, "testBinding");
Endpoint rep = control.createMock(Endpoint.class);
Service res = control.createMock(Service.class);
@@ -390,13 +390,13 @@ public class ColocOutInterceptorTest extends Assert {
//Causes ConcurrentModification intermittently
//QName op = new QName("E", "F");
//EasyMock.expect(rbi.getOperation(op).andReturn(null);
-
+
control.replay();
Server val = colocOut.isColocated(list, sep, sboi);
assertEquals("Is not a colocated call",
null,
val);
- assertEquals("BindingOperation.getOperation was not called",
+ assertEquals("BindingOperation.getOperation was not called",
1, rbi.getOpCount());
control.reset();
}
@@ -406,7 +406,7 @@ public class ColocOutInterceptorTest extends Assert {
//Funtion Param
Server s1 = control.createMock(Server.class);
List<Server> list = new ArrayList<>();
- list.add(s1);
+ list.add(s1);
Endpoint sep = control.createMock(Endpoint.class);
BindingOperationInfo sboi = control.createMock(BindingOperationInfo.class);
@@ -418,7 +418,7 @@ public class ColocOutInterceptorTest extends Assert {
Service res = control.createMock(Service.class);
EndpointInfo rei = control.createMock(EndpointInfo.class);
BindingOperationInfo rboi = control.createMock(BindingOperationInfo.class);
-
+
QName op = new QName("E", "F");
QName intf = new QName("G", "H");
QName inmi = new QName("M", "in");
@@ -431,14 +431,14 @@ public class ColocOutInterceptorTest extends Assert {
MessageInfo mio = new MessageInfo(soi, MessageInfo.Type.OUTPUT, outmi);
soi.setInput("in", mii);
soi.setOutput("out", mio);
-
+
ServiceInfo rsi = new ServiceInfo();
InterfaceInfo rii = new InterfaceInfo(rsi, intf);
rii.addOperation(op);
OperationInfo roi = rii.getOperation(op);
roi.setInput("in", mii);
roi.setOutput("out", mio);
-
+
EasyMock.expect(sep.getService()).andReturn(ses);
EasyMock.expect(sep.getEndpointInfo()).andReturn(sei);
EasyMock.expect(s1.getEndpoint()).andReturn(rep);
@@ -449,13 +449,13 @@ public class ColocOutInterceptorTest extends Assert {
EasyMock.expect(rei.getName()).andReturn(new QName("C", "D"));
EasyMock.expect(sei.getName()).andReturn(new QName("C", "D"));
EasyMock.expect(rei.getBinding()).andReturn(rbi);
-
+
EasyMock.expect(sboi.getName()).andReturn(op);
EasyMock.expect(sboi.getOperationInfo()).andReturn(soi);
EasyMock.expect(rboi.getName()).andReturn(op);
EasyMock.expect(rboi.getOperationInfo()).andReturn(roi);
EasyMock.expect(rbi.getOperation(op)).andReturn(rboi);
-
+
control.replay();
Server val = colocOut.isColocated(list, sep, sboi);
assertEquals("Expecting a colocated call",
@@ -469,7 +469,7 @@ public class ColocOutInterceptorTest extends Assert {
//Funtion Param
Server s1 = control.createMock(Server.class);
List<Server> list = new ArrayList<>();
- list.add(s1);
+ list.add(s1);
Endpoint sep = control.createMock(Endpoint.class);
BindingOperationInfo sboi = control.createMock(BindingOperationInfo.class);
@@ -481,7 +481,7 @@ public class ColocOutInterceptorTest extends Assert {
Service res = control.createMock(Service.class);
EndpointInfo rei = control.createMock(EndpointInfo.class);
BindingOperationInfo rboi = control.createMock(BindingOperationInfo.class);
-
+
QName op = new QName("E", "F");
QName intf = new QName("G", "H");
QName inmi = new QName("M", "in");
@@ -498,7 +498,7 @@ public class ColocOutInterceptorTest extends Assert {
mpi.setTypeClass(Source.class);
soi.setInput("in", mii);
soi.setOutput("out", mio);
-
+
ServiceInfo rsi = new ServiceInfo();
InterfaceInfo rii = new InterfaceInfo(rsi, intf);
rii.addOperation(op);
@@ -511,7 +511,7 @@ public class ColocOutInterceptorTest extends Assert {
mpi.setTypeClass(Object.class);
roi.setInput("in", mii);
roi.setOutput("out", mio);
-
+
EasyMock.expect(sep.getService()).andReturn(ses);
EasyMock.expect(sep.getEndpointInfo()).andReturn(sei);
EasyMock.expect(s1.getEndpoint()).andReturn(rep);
@@ -522,13 +522,13 @@ public class ColocOutInterceptorTest extends Assert {
EasyMock.expect(rei.getName()).andReturn(new QName("C", "D"));
EasyMock.expect(sei.getName()).andReturn(new QName("C", "D"));
EasyMock.expect(rei.getBinding()).andReturn(rbi);
-
+
EasyMock.expect(sboi.getName()).andReturn(op);
EasyMock.expect(sboi.getOperationInfo()).andReturn(soi);
EasyMock.expect(rboi.getName()).andReturn(op);
EasyMock.expect(rboi.getOperationInfo()).andReturn(roi);
EasyMock.expect(rbi.getOperation(op)).andReturn(rboi);
-
+
control.replay();
Server val = colocOut.isColocated(list, sep, sboi);
assertEquals("Expecting a colocated call",
@@ -536,39 +536,39 @@ public class ColocOutInterceptorTest extends Assert {
val);
control.reset();
}
-
+
private Bus setupBus() {
Bus bus = control.createMock(Bus.class);
BusFactory.setDefaultBus(bus);
return bus;
}
-
+
class TestColocOutInterceptor1 extends ColocOutInterceptor {
public void invokeColocObserver(Message outMsg, Endpoint inboundEndpoint) {
//No Op
}
-
+
public void invokeInboundChain(Exchange exchange, Endpoint ep) {
//No Op
}
-
+
}
-
+
class TestBindingInfo extends BindingInfo {
private int opCount;
TestBindingInfo(ServiceInfo si, String bindingId) {
super(si, bindingId);
}
-
+
public int getOpCount() {
return opCount;
}
-
+
public BindingOperationInfo getOperation(QName opName) {
BindingOperationInfo boi = super.getOperation(opName);
++opCount;
return boi;
}
-
+
}
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocUtilTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocUtilTest.java b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocUtilTest.java
index f569aea..0a6b192 100644
--- a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocUtilTest.java
+++ b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/ColocUtilTest.java
@@ -103,21 +103,21 @@ public class ColocUtilTest extends Assert {
Phase.POST_LOGICAL);
}
-
+
@Test
public void testGetOutInterceptorChain() throws Exception {
PhaseManagerImpl phaseMgr = new PhaseManagerImpl();
SortedSet<Phase> list = phaseMgr.getInPhases();
ColocUtil.setPhases(list, Phase.SETUP, Phase.POST_LOGICAL);
-
+
Endpoint ep = control.createMock(Endpoint.class);
Service srv = control.createMock(Service.class);
Exchange ex = new ExchangeImpl();
-
+
ex.put(Bus.class, bus);
ex.put(Endpoint.class, ep);
ex.put(Service.class, srv);
-
+
EasyMock.expect(ep.getOutInterceptors())
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
EasyMock.expect(ep.getService()).andReturn(srv).atLeastOnce();
@@ -125,7 +125,7 @@ public class ColocUtilTest extends Assert {
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
EasyMock.expect(bus.getOutInterceptors())
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
-
+
control.replay();
InterceptorChain chain = ColocUtil.getOutInterceptorChain(ex, list);
control.verify();
@@ -141,15 +141,15 @@ public class ColocUtilTest extends Assert {
PhaseManagerImpl phaseMgr = new PhaseManagerImpl();
SortedSet<Phase> list = phaseMgr.getInPhases();
ColocUtil.setPhases(list, Phase.SETUP, Phase.POST_LOGICAL);
-
+
Endpoint ep = control.createMock(Endpoint.class);
Service srv = control.createMock(Service.class);
Exchange ex = new ExchangeImpl();
-
+
ex.put(Bus.class, bus);
ex.put(Endpoint.class, ep);
ex.put(Service.class, srv);
-
+
EasyMock.expect(bus.getExtension(PhaseManager.class)).andReturn(phaseMgr);
EasyMock.expect(ep.getInInterceptors())
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
@@ -158,7 +158,7 @@ public class ColocUtilTest extends Assert {
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
EasyMock.expect(bus.getInInterceptors())
.andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
-
+
control.replay();
InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, list);
control.verify();
@@ -169,11 +169,11 @@ public class ColocUtilTest extends Assert {
iter.hasNext());
assertNotNull("OutFaultObserver should be set", chain.getFaultObserver());
}
-
+
@Test
public void testIsSameFaultInfo() {
OperationInfo oi = control.createMock(OperationInfo.class);
-
+
boolean match = ColocUtil.isSameFaultInfo(null, null);
assertEquals("Should return true", true, match);
List<FaultInfo> fil1 = new ArrayList<>();
@@ -181,13 +181,13 @@ public class ColocUtilTest extends Assert {
assertEquals("Should not find a match", false, match);
match = ColocUtil.isSameFaultInfo(null, fil1);
assertEquals("Should not find a match", false, match);
-
+
List<FaultInfo> fil2 = new ArrayList<>();
match = ColocUtil.isSameFaultInfo(fil1, fil2);
-
+
QName fn1 = new QName("A", "B");
QName fn2 = new QName("C", "D");
-
+
FaultInfo fi1 = new FaultInfo(fn1, null, oi);
fi1.setProperty(Class.class.getName(), PingMeFault.class);
fil1.add(fi1);
@@ -202,7 +202,7 @@ public class ColocUtilTest extends Assert {
match = ColocUtil.isSameFaultInfo(fil1, fil2);
assertEquals("Should find a match", true, match);
}
-
+
@Test
public void testIsSameMessageInfo() {
OperationInfo oi = control.createMock(OperationInfo.class);
@@ -217,21 +217,21 @@ public class ColocUtilTest extends Assert {
assertEquals("Should not find a match", false, match);
match = ColocUtil.isSameMessageInfo(null, mi2);
assertEquals("Should not find a match", false, match);
-
+
MessagePartInfo mpi = new MessagePartInfo(new QName("", "B"), null);
mpi.setTypeClass(InHeaderT.class);
mi1.addMessagePart(mpi);
-
+
mpi = new MessagePartInfo(new QName("", "D"), null);
mpi.setTypeClass(OutHeaderT.class);
mi2.addMessagePart(mpi);
-
+
match = ColocUtil.isSameMessageInfo(mi1, mi2);
assertEquals("Should not find a match", false, match);
-
+
mpi.setTypeClass(InHeaderT.class);
match = ColocUtil.isSameMessageInfo(mi1, mi2);
assertEquals("Should find a match", true, match);
}
-
+
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandlerTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandlerTest.java b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandlerTest.java
index 4fd6c01..7ca9b7d 100644
--- a/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandlerTest.java
+++ b/rt/bindings/coloc/src/test/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandlerTest.java
@@ -1,36 +1,36 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.binding.coloc.blueprint;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- *
- */
-public class ColocBPNamespaceHandlerTest extends Assert {
- @Test
- public void testGetSchemaLocation() {
- ColocBPNamespaceHandler handler = new ColocBPNamespaceHandler();
-
- assertNotNull(handler.getSchemaLocation("http://cxf.apache.org/binding/coloc"));
- }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.binding.coloc.blueprint;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ColocBPNamespaceHandlerTest extends Assert {
+ @Test
+ public void testGetSchemaLocation() {
+ ColocBPNamespaceHandler handler = new ColocBPNamespaceHandler();
+
+ assertNotNull(handler.getSchemaLocation("http://cxf.apache.org/binding/coloc"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBinding.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBinding.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBinding.java
index 7681de1..ea541cd 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBinding.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBinding.java
@@ -32,19 +32,19 @@ import org.apache.cxf.service.model.BindingInfo;
public class CorbaBinding extends AbstractBasicInterceptorProvider implements Binding {
private BindingInfo bindingInfo;
-
+
public CorbaBinding() {
}
-
+
public void setBindingInfo(BindingInfo info) {
bindingInfo = info;
}
-
+
public BindingInfo getBindingInfo() {
return bindingInfo;
}
-
+
public Message createMessage() {
return createMessage(new MessageImpl());
}
@@ -56,7 +56,7 @@ public class CorbaBinding extends AbstractBasicInterceptorProvider implements Bi
public List<Interceptor<? extends Message>> getFaultInInterceptors() {
return this.getInFaultInterceptors();
}
-
+
public List<Interceptor<? extends Message>> getFaultOutInterceptors() {
return this.getOutFaultInterceptors();
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingException.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingException.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingException.java
index 0ccb7d6..7b88949 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingException.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingException.java
@@ -21,8 +21,8 @@ package org.apache.cxf.binding.corba;
import javax.xml.ws.ProtocolException;
// NOTE: This exception provides basic functionality for throwing exceptions within the binding.
-// At the momemnt, we just want to support the ability to throw a message (and accompanying
-// exception) but it may be necessary to break up this functionality into separate exceptions
+// At the momemnt, we just want to support the ability to throw a message (and accompanying
+// exception) but it may be necessary to break up this functionality into separate exceptions
// or make this exception a bit more complex.
public class CorbaBindingException extends ProtocolException {
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
index fabcbf3..78c1b53 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
@@ -47,13 +47,13 @@ import org.apache.cxf.wsdl.interceptors.BareOutInterceptor;
public class CorbaBindingFactory extends AbstractWSDLBindingFactory
implements ConduitInitiator, DestinationFactory {
- public static final Collection<String> DEFAULT_NAMESPACES
+ public static final Collection<String> DEFAULT_NAMESPACES
= Arrays.asList(
"http://cxf.apache.org/bindings/corba",
"http://schemas.apache.org/yoko/bindings/corba"
);
-
+
protected List<String> transportIds = new ArrayList<>(DEFAULT_NAMESPACES);
protected OrbConfig orbConfig = new OrbConfig();
@@ -65,7 +65,7 @@ public class CorbaBindingFactory extends AbstractWSDLBindingFactory
public void setOrbClass(String cls) {
orbConfig.setOrbClass(cls);
}
-
+
public void setOrbSingletonClass(String cls) {
orbConfig.setOrbSingletonClass(cls);
}
@@ -109,7 +109,7 @@ public class CorbaBindingFactory extends AbstractWSDLBindingFactory
public void setOrbArgs(List<String> args) {
orbConfig.setOrbArgs(args);
}
-
+
public Set<String> getUriPrefixes() {
Set<String> uriPrefixes = new java.util.HashSet<String>();
uriPrefixes.add("IOR");
@@ -119,7 +119,7 @@ public class CorbaBindingFactory extends AbstractWSDLBindingFactory
uriPrefixes.add("corba");
return uriPrefixes;
}
-
+
public OrbConfig getOrbConfig() {
return orbConfig;
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
index 98218ca..5a6c766 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
@@ -86,16 +86,16 @@ public class CorbaConduit implements Conduit {
public OrbConfig getOrbConfig() {
return orbConfig;
}
-
+
public synchronized void prepareOrb() {
if (orb == null) {
orb = CorbaBindingHelper.getDefaultORB(orbConfig);
}
}
- public void prepare(Message message) throws IOException {
+ public void prepare(Message message) throws IOException {
try {
prepareOrb();
-
+
String address = null;
if (target != null) {
address = target.getAddress().getValue();
@@ -123,11 +123,11 @@ public class CorbaConduit implements Conduit {
message.put(CorbaConstants.CORBA_ENDPOINT_OBJECT, targetObject);
message.setContent(OutputStream.class,
new CorbaOutputStream(message));
-
+
if (message instanceof CorbaMessage) {
((CorbaMessage)message).setCorbaTypeMap(typeMap);
}
-
+
} catch (java.lang.Exception ex) {
LOG.log(Level.SEVERE, "Could not resolve target object");
throw new CorbaBindingException(ex);
@@ -140,7 +140,7 @@ public class CorbaConduit implements Conduit {
OperationType opType = boi.getExtensor(OperationType.class);
try {
if (message instanceof CorbaMessage) {
- buildRequest((CorbaMessage)message, opType);
+ buildRequest((CorbaMessage)message, opType);
}
message.getContent(OutputStream.class).close();
} catch (Exception ex) {
@@ -155,7 +155,7 @@ public class CorbaConduit implements Conduit {
}
public void close() {
-
+
}
public void setMessageObserver(MessageObserver observer) {
@@ -178,8 +178,8 @@ public class CorbaConduit implements Conduit {
public final String getAddress() {
return endpointInfo.getAddress();
}
-
- public void buildRequest(CorbaMessage message, OperationType opType) throws Exception {
+
+ public void buildRequest(CorbaMessage message, OperationType opType) throws Exception {
ServiceInfo service = message.getExchange().getEndpoint().getEndpointInfo().getService();
NVList nvlist = getArguments(message);
NamedValue ret = getReturn(message);
@@ -216,7 +216,7 @@ public class CorbaConduit implements Conduit {
raises.getException(),
typeMap,
service);
-
+
CorbaStreamable exStreamable = message.createStreamableObject(handler, elName);
exStreamable._read(except.create_input_stream());
message.setStreamableException(exStreamable);
@@ -226,7 +226,7 @@ public class CorbaConduit implements Conduit {
}
}
}
-
+
public NVList getArguments(CorbaMessage message) {
if (orb == null) {
prepareOrb();
@@ -246,9 +246,9 @@ public class CorbaConduit implements Conduit {
list = orb.create_list(0);
}
- return list;
+ return list;
}
-
+
public NamedValue getReturn(CorbaMessage message) {
if (orb == null) {
prepareOrb();
@@ -261,15 +261,15 @@ public class CorbaConduit implements Conduit {
ret = orb.create_named_value(retVal.getName(), returnAny, org.omg.CORBA.ARG_OUT.value);
} else {
// TODO: REVISIT: for some reason,some ORBs do not like to
- // have a null NamedValue return value. Create this 'empty'
+ // have a null NamedValue return value. Create this 'empty'
// one if a void return type is used.
ret = orb.create_named_value("return", orb.create_any(), org.omg.CORBA.ARG_OUT.value);
}
- return ret;
+ return ret;
}
-
+
public ExceptionList getExceptionList(Map<TypeCode, RaisesType> exceptions,
- CorbaMessage message,
+ CorbaMessage message,
OperationType opType) {
if (orb == null) {
prepareOrb();
@@ -279,23 +279,23 @@ public class CorbaConduit implements Conduit {
// These are defined in the operation definition from WSDL.
ExceptionList exList = orb.create_exception_list();
-
+
if (exceptions != null) {
Object[] tcs = null;
tcs = exceptions.keySet().toArray();
-
+
for (int i = 0; i < exceptions.size(); ++i) {
exList.add((TypeCode)tcs[i]);
}
}
return exList;
}
-
+
public Request getRequest(CorbaMessage message,
String opName,
- org.omg.CORBA.NVList nvlist,
- org.omg.CORBA.NamedValue ret,
- org.omg.CORBA.ExceptionList exList)
+ org.omg.CORBA.NVList nvlist,
+ org.omg.CORBA.NamedValue ret,
+ org.omg.CORBA.ExceptionList exList)
throws Exception {
Request request = null;
if (orb == null) {
@@ -304,7 +304,7 @@ public class CorbaConduit implements Conduit {
ContextList ctxList = orb.create_context_list();
Context ctx = null;
try {
- ctx = orb.get_default_context();
+ ctx = orb.get_default_context();
} catch (Exception ex) {
//ignore?
}
@@ -316,15 +316,15 @@ public class CorbaConduit implements Conduit {
}
return request;
}
-
+
public Map<TypeCode, RaisesType> getOperationExceptions(
- OperationType operation,
+ OperationType operation,
CorbaTypeMap map) {
if (orb == null) {
prepareOrb();
}
Map<TypeCode, RaisesType> exceptions = new HashMap<TypeCode, RaisesType>();
- List<RaisesType> exList = operation.getRaises();
+ List<RaisesType> exList = operation.getRaises();
if (exList != null) {
for (int i = 0; i < exList.size(); ++i) {
RaisesType ex = exList.get(i);
@@ -335,14 +335,14 @@ public class CorbaConduit implements Conduit {
return exceptions;
}
-
+
private class CorbaOutputStream extends CachedOutputStream {
-
+
private Message message;
private boolean isOneWay;
CorbaOutputStream(Message m) {
- message = m;
+ message = m;
}
/**
@@ -356,18 +356,18 @@ public class CorbaConduit implements Conduit {
/**
* Perform any actions required on stream closure (handle response etc.)
*/
- public void doClose() throws IOException {
+ public void doClose() throws IOException {
if (ContextUtils.isRequestor(message) && ContextUtils.isOutbound(message)) {
try {
isOneWay = message.getExchange().isOneWay();
-
- if (!isOneWay) {
+
+ if (!isOneWay) {
handleResponse();
}
} catch (Exception ex) {
LOG.log(Level.WARNING, "Connection failed with Exception : ", ex);
throw new IOException(ex.toString());
- }
+ }
}
}
@@ -384,7 +384,7 @@ public class CorbaConduit implements Conduit {
inMessage.setDestination(destination);
exchange.put(ORB.class, orb);
inMessage.setExchange(exchange);
- CorbaMessage inCorbaMsg = new CorbaMessage(inMessage);
+ CorbaMessage inCorbaMsg = new CorbaMessage(inMessage);
inCorbaMsg.setCorbaTypeMap(typeMap);
if (corbaMsg.getStreamableException() != null) {
exchange.setInFaultMessage(corbaMsg);
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
index 87a6da4..ad89d45 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
@@ -58,10 +58,10 @@ import org.omg.PortableServer.Servant;
import org.omg.PortableServer.ThreadPolicyValue;
public class CorbaDestination implements MultiplexDestination {
-
+
private static final String IOR_SHARED_KEY = "ior:shared-key";
private static final Logger LOG = LogUtils.getL7dLogger(CorbaDestination.class);
-
+
private AddressType address;
private EndpointReferenceType reference;
private ORB orb;
@@ -78,7 +78,7 @@ public class CorbaDestination implements MultiplexDestination {
private org.omg.CORBA.Object obj;
public CorbaDestination(EndpointInfo ei, OrbConfig config) {
- this(ei, config, null);
+ this(ei, config, null);
}
public CorbaDestination(EndpointInfo ei, OrbConfig config, CorbaTypeMap tm) {
@@ -99,17 +99,17 @@ public class CorbaDestination implements MultiplexDestination {
if (policy != null) {
poaName = policy.getPoaname();
isPersistent = policy.isPersistent();
- serviceId = policy.getServiceid();
+ serviceId = policy.getServiceid();
}
}
public OrbConfig getOrbConfig() {
return orbConfig;
}
-
+
public EndpointReferenceType getAddress() {
return reference;
- }
+ }
public Conduit getBackChannel(Message inMessage)
throws IOException {
@@ -120,7 +120,7 @@ public class CorbaDestination implements MultiplexDestination {
public BindingInfo getBindingInfo() {
return binding;
}
-
+
public EndpointInfo getEndPointInfo() {
return endpointInfo;
}
@@ -147,9 +147,9 @@ public class CorbaDestination implements MultiplexDestination {
orb = null;
}
}
-
- public ORB getORB(List<String> orbArgs,
- String location,
+
+ public ORB getORB(List<String> orbArgs,
+ String location,
java.util.Properties props) {
// See if an ORB has already been created for the given address. If so,
// we'll simply use it
@@ -162,24 +162,24 @@ public class CorbaDestination implements MultiplexDestination {
// Get the binding helper to remember that we need this ORB kept alive, even if another
// destination tries to destroy it.
CorbaBindingHelper.keepORBAlive(location);
-
+
return orb;
}
-
+
protected ORB getOrb() {
return orb;
}
-
+
protected AddressType getAddressType() {
return address;
- }
+ }
public synchronized void setMessageObserver(MessageObserver observer) {
if (observer != incomingObserver) {
MessageObserver old = incomingObserver;
incomingObserver = observer;
- if (observer != null) {
+ if (observer != null) {
if (old == null) {
activate();
}
@@ -202,17 +202,17 @@ public class CorbaDestination implements MultiplexDestination {
props.put("org.omg.CORBA.ORBSingletonClass", orbConfig
.getOrbSingletonClass());
}
-
+
String location = getDestinationAddress();
-
+
if (!CorbaUtils.isValidURL(location)) {
throw new CorbaBindingException(
"Invalid addressing specified for CORBA port location");
}
-
+
LOG.info("Service address retrieved: " + location);
-
-
+
+
URI addressURI = null;
try {
addressURI = new URI(location);
@@ -220,8 +220,8 @@ public class CorbaDestination implements MultiplexDestination {
throw new CorbaBindingException(
"Unable to create ORB with address " + address);
}
-
-
+
+
List<String> orbArgs = new ArrayList<>(orbConfig.getOrbArgs());
String scheme = addressURI.getScheme();
@@ -235,7 +235,7 @@ public class CorbaDestination implements MultiplexDestination {
}
if ("corbaloc".equals(scheme)) {
if (poaName == null) {
- poaName = getEndPointInfo().getName().getLocalPart().replace('.', '_');
+ poaName = getEndPointInfo().getName().getLocalPart().replace('.', '_');
}
setCorbaLocArgs(addressURI, orbArgs);
} else if ("corbaname".equals(scheme)) {
@@ -257,8 +257,8 @@ public class CorbaDestination implements MultiplexDestination {
.getLocalPart(), poaName).replace('.', '_');
}
- orb = getORB(orbArgs, location, props);
-
+ orb = getORB(orbArgs, location, props);
+
try {
POA rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
@@ -285,7 +285,7 @@ public class CorbaDestination implements MultiplexDestination {
} else if (bindingPOA == null) {
bindingPOA = createPOA(poaName, rootPOA, poaManager);
}
-
+
if (bindingPOA == null) {
throw new CorbaBindingException("Unable to create CXF CORBA Binding POA");
}
@@ -303,16 +303,16 @@ public class CorbaDestination implements MultiplexDestination {
+ " already active for non-persistent poa");
}
}
- } else {
+ } else {
objectId = bindingPOA.activate_object(servant);
}
bindingPOA.set_servant(servant);
obj = bindingPOA.id_to_reference(objectId);
orbConfig.exportObjectReference(orb, obj, location, address);
-
+
populateEpr(orb.object_to_string(obj));
LOG.info("Object Reference: " + orb.object_to_string(obj));
- // TODO: Provide other export mechanisms?
+ // TODO: Provide other export mechanisms?
poaManager.activate();
} catch (Exception ex) {
throw new CorbaBindingException("Unable to activate CORBA servant", ex);
@@ -327,9 +327,9 @@ public class CorbaDestination implements MultiplexDestination {
public String getDestinationAddress() {
// We should check the endpoint first for an address. This allows object references
- // to use the address that is associated with their endpoint instead of the single
- // address for a particular port type that is listed in the wsdl. Otherwise, for all
- // object references we want to create, we would need to add the address to the wsdl
+ // to use the address that is associated with their endpoint instead of the single
+ // address for a particular port type that is listed in the wsdl. Otherwise, for all
+ // object references we want to create, we would need to add the address to the wsdl
// file before running the application.
String location = null;
if (endpointInfo != null) {
@@ -342,7 +342,7 @@ public class CorbaDestination implements MultiplexDestination {
return location;
}
-
+
public MessageObserver getMessageObserver() {
return incomingObserver;
}
@@ -363,7 +363,7 @@ public class CorbaDestination implements MultiplexDestination {
}
}
}
-
+
private void setCorbaLocArgs(URI addressURI, List<String> orbArgs) {
String schemeSpecificPart = addressURI.getSchemeSpecificPart();
int keyIndex = schemeSpecificPart.indexOf('/');
@@ -408,15 +408,15 @@ public class CorbaDestination implements MultiplexDestination {
if (serviceId != null) {
policies.add(parentPOA
.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID));
-
+
}
policies.add(parentPOA.create_id_uniqueness_policy(IdUniquenessPolicyValue.MULTIPLE_ID));
RequestProcessingPolicyValue value = RequestProcessingPolicyValue.USE_DEFAULT_SERVANT;
- policies.add(parentPOA.create_request_processing_policy(value));
-
+ policies.add(parentPOA.create_request_processing_policy(value));
+
orbConfig.addPOAPolicies(orb, name, parentPOA, poaManager, policies);
-
+
Policy[] policyList = policies.toArray(new Policy[policies.size()]);
try {
@@ -434,7 +434,7 @@ public class CorbaDestination implements MultiplexDestination {
}
try {
Servant servant = bindingPOA.id_to_servant(objectId);
- org.omg.CORBA.Object objRef
+ org.omg.CORBA.Object objRef
= bindingPOA.create_reference_with_id(id.getBytes(),
servant._all_interfaces(bindingPOA, objectId)[0]);
AddressType addr = new AddressType();
@@ -444,7 +444,7 @@ public class CorbaDestination implements MultiplexDestination {
ref = EndpointReferenceUtils.getEndpointReference(addr.getLocation());
EndpointInfo ei = getEndPointInfo();
if (ei.getService() != null) {
- EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(),
+ EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(),
ei.getName().getLocalPart());
}
} catch (Exception e) {