incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r545189 - in /incubator/yoko/trunk/bindings/src: main/java/org/apache/yoko/bindings/corba/CorbaConduit.java test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java
Date Thu, 07 Jun 2007 14:20:49 GMT
Author: bravi
Date: Thu Jun  7 07:20:48 2007
New Revision: 545189

URL: http://svn.apache.org/viewvc?view=rev&rev=545189
Log:
Fixing the bindings module continuum failure because of cxf code changes.

Modified:
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
    incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java?view=diff&rev=545189&r1=545188&r2=545189
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
Thu Jun  7 07:20:48 2007
@@ -110,7 +110,7 @@
             
             CorbaMessage corbaMessage = (CorbaMessage) message;
             corbaMessage.setCorbaTypeMap(typeMap);
-            
+           
         } catch (java.lang.Exception ex) {
             LOG.log(Level.SEVERE, "Could not resolve target object");
             throw new CorbaBindingException(ex);
@@ -118,15 +118,16 @@
     }
 
     public void close(Message message) throws IOException {
-        BindingOperationInfo boi = message.getExchange().get(BindingOperationInfo.class);
-        OperationType opType = boi.getExtensor(OperationType.class);
-        
-        try {
-            buildRequest((CorbaMessage)message, opType);            
-            message.getContent(OutputStream.class).close();
-        } catch (Exception ex) {
-            LOG.log(Level.SEVERE, "Could not build the corba request");
-            throw new CorbaBindingException(ex);
+        if (message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT) != null) {
+            BindingOperationInfo boi = message.getExchange().get(BindingOperationInfo.class);
+            OperationType opType = boi.getExtensor(OperationType.class);
+            try {
+                buildRequest((CorbaMessage)message, opType);            
+                message.getContent(OutputStream.class).close();
+            } catch (Exception ex) {
+                LOG.log(Level.SEVERE, "Could not build the corba request");
+                throw new CorbaBindingException(ex);
+            }
         }
     }
 
@@ -315,7 +316,7 @@
         /**
          * 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();

Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java?view=diff&rev=545189&r1=545188&r2=545189
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java
(original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaConduitTest.java
Thu Jun  7 07:20:48 2007
@@ -170,7 +170,9 @@
             new Class[] {CorbaMessage.class, OperationType.class});
         CorbaConduit conduit = EasyMock.createMock(CorbaConduit.class, new Method[] {m});
      
         
+        org.omg.CORBA.Object obj = control.createMock(org.omg.CORBA.Object.class);
         CorbaMessage msg = control.createMock(CorbaMessage.class);
+        EasyMock.expect(msg.get(CorbaConstants.CORBA_ENDPOINT_OBJECT)).andReturn(obj);
         Exchange exg = control.createMock(Exchange.class);
         EasyMock.expect(msg.getExchange()).andReturn(exg);
         BindingOperationInfo bopInfo = control.createMock(BindingOperationInfo.class);



Mime
View raw message