incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmidd...@apache.org
Subject svn commit: r414662 - in /incubator/yoko/trunk/bindings: ./ src/main/java/org/apache/yoko/bindings/corba/ src/main/java/org/apache/yoko/bindings/corba/extensions/
Date Thu, 15 Jun 2006 19:52:41 GMT
Author: dmiddlem
Date: Thu Jun 15 12:52:40 2006
New Revision: 414662

URL: http://svn.apache.org/viewvc?rev=414662&view=rev
Log:
Bug fixes for issues found during testing, comments cleanup, adding
dependency on the core module for the upcoming tests.

Modified:
    incubator/yoko/trunk/bindings/pom.xml
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingFactory.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingImpl.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaClientBinding.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectHolder.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectReader.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectWriter.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaTypeMap.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaUtils.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/extensions/CorbaOperationExtensionHelper.java

Modified: incubator/yoko/trunk/bindings/pom.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/pom.xml?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/pom.xml (original)
+++ incubator/yoko/trunk/bindings/pom.xml Thu Jun 15 12:52:40 2006
@@ -48,6 +48,12 @@
             <artifactId>yoko-api</artifactId>
             <version>${project.version}</version>
         </dependency>
+        
+	<dependency>
+            <groupId>org.apache.yoko</groupId>
+            <artifactId>yoko-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
  
  

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingFactory.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingFactory.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingFactory.java
Thu Jun 15 12:52:40 2006
@@ -63,8 +63,8 @@
     }
 
     public ServerBinding createServerBinding(EndpointReferenceType reference,
-            ServerBindingEndpointCallback cbFactory) throws WSDLException,
-            IOException {
+                                             ServerBindingEndpointCallback cbFactory) 
+        throws WSDLException, IOException {
         return new CorbaServerBinding(bus, reference, cbFactory);
     }
 }

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingImpl.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingImpl.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaBindingImpl.java
Thu Jun 15 12:52:40 2006
@@ -349,7 +349,7 @@
         throws CorbaBindingException {
         CorbaObjectHolder obj = null;
         Stack<CorbaObjectHolder> objStack = new Stack<CorbaObjectHolder>();
-
+        
         NamedType currentType = null;
         QName currentIdlType = null;
 
@@ -366,7 +366,6 @@
             while (!evt.isEndDocument()) {
                 switch (evt.getEventType()) {
                 case XMLStreamConstants.START_ELEMENT:
-
                     StartElement startEl = evt.asStartElement();
 
                     if (obj == null) {

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaClientBinding.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaClientBinding.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaClientBinding.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaClientBinding.java
Thu Jun 15 12:52:40 2006
@@ -101,10 +101,16 @@
                 }
             }
 
-            if (address == null || !isBindingCompatible(address.getLocation())) {
+            if (address == null) {
+                LOG.log(Level.SEVERE, "Unable to locate a valid CORBA address");
+                throw new CorbaBindingException("Unable to locate a valid CORBA address");
+            }
+            
+            if (!isBindingCompatible(address.getLocation())) {
                 LOG.log(Level.SEVERE, "Address not a valid CORBA address");
                 throw new CorbaBindingException("Address not a valid CORBA address");
             }
+
             target = orb.string_to_object(address.getLocation());
         } catch (Exception ex) {
             LOG.log(Level.SEVERE, "Could not resolve target object");

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectHolder.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectHolder.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectHolder.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectHolder.java
Thu Jun 15 12:52:40 2006
@@ -84,23 +84,24 @@
         switch (typeCode.kind().value()) {
 
         case TCKind._tk_boolean:
-            retValue = ((Boolean) value).toString();
+            retValue = ((Boolean)value).toString();
             break;
         case TCKind._tk_char:
-            char charValue = ((Character) value).charValue();
+            char charValue = ((Character)value).charValue();
             retValue = Byte.toString((byte) charValue);
             break;
         case TCKind._tk_wchar:
-            retValue = ((Character) value).toString();
+            retValue = ((Character)value).toString();
             break;
         case TCKind._tk_octet:
-            retValue = ((Byte) value).toString();
+            retValue = ((Byte)value).toString();
             break;
         case TCKind._tk_short:
-            retValue = ((Short) value).toString();
+        case TCKind._tk_ushort:
+            retValue = ((Short)value).toString();
             break;
         case TCKind._tk_long:
-            retValue = ((Long) value).toString();
+            retValue = ((Long)value).toString();
             break;
         case TCKind._tk_ulong:
         case TCKind._tk_longlong:
@@ -108,10 +109,10 @@
             retValue = ((java.math.BigInteger) value).toString();
             break;
         case TCKind._tk_float:
-            retValue = ((Float) value).toString();
+            retValue = ((Float)value).toString();
             break;
         case TCKind._tk_double:
-            retValue = ((Double) value).toString();
+            retValue = ((Double)value).toString();
             break;
         case TCKind._tk_string:
         case TCKind._tk_wstring:
@@ -161,6 +162,7 @@
             value = new Byte(shortValue.byteValue());
             break;
         case TCKind._tk_short:
+        case TCKind._tk_ushort:
             value = new Short(data);
             break;
         case TCKind._tk_long:

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectReader.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectReader.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectReader.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectReader.java
Thu Jun 15 12:52:40 2006
@@ -33,8 +33,7 @@
 
 public class CorbaObjectReader {
 
-    private static final Logger LOG = LogUtils
-            .getL7dLogger(CorbaBindingImpl.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(CorbaBindingImpl.class);
 
     private InputStream stream;
 
@@ -65,6 +64,9 @@
         case TCKind._tk_short:
             obj.setValue(this.readShort().toString());
             break;
+        case TCKind._tk_ushort:
+            obj.setValue(this.readUShort().toString());
+            break;
         case TCKind._tk_long:
             obj.setValue(this.readLong().toString());
             break;
@@ -164,6 +166,17 @@
         } catch (org.omg.CORBA.MARSHAL ex) {
             LOG.log(Level.SEVERE, "CorbaObjectReader: could not read short");
             throw new CorbaBindingException("CorbaObjectReader: readShort MARSHAL exception",
ex);
+        }
+    }
+
+    public Short readUShort() throws CorbaBindingException {
+        try {
+            Short result;
+            result = new Short(stream.read_ushort());
+            return result;
+        } catch (org.omg.CORBA.MARSHAL ex) {
+            LOG.log(Level.SEVERE, "CorbaObjectReader: could not read unsigned short");
+            throw new CorbaBindingException("CorbaObjectReader: readUShort MARSHAL exception",
ex);
         }
     }
 

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectWriter.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectWriter.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectWriter.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaObjectWriter.java
Thu Jun 15 12:52:40 2006
@@ -52,6 +52,9 @@
         case TCKind._tk_short:
             this.writeShort((Short) obj.getValue());
             break;
+        case TCKind._tk_ushort:
+            this.writeUShort((Short) obj.getValue());
+            break;
         case TCKind._tk_long:
             this.writeLong((Long) obj.getValue());
             break;
@@ -117,6 +120,10 @@
 
     public void writeShort(Short s) throws CorbaBindingException {
         stream.write_short(s.shortValue());
+    }
+
+    public void writeUShort(Short s) throws CorbaBindingException {
+        stream.write_ushort(s.shortValue());
     }
 
     public void writeLong(Long l) throws CorbaBindingException {

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaTypeMap.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaTypeMap.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaTypeMap.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaTypeMap.java
Thu Jun 15 12:52:40 2006
@@ -26,9 +26,7 @@
 public class CorbaTypeMap {
 
     private String targetNamespace;
-
     private String prefix;
-
     private Map<String, CorbaType> typeMap;
 
     public CorbaTypeMap(String namespace) {

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaUtils.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaUtils.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaUtils.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaUtils.java
Thu Jun 15 12:52:40 2006
@@ -387,6 +387,7 @@
         PRIMITIVE_TYPECODES.put(CorbaConstants.NT_CORBA_CHAR, TCKind.from_int(TCKind._tk_char));
         PRIMITIVE_TYPECODES.put(CorbaConstants.NT_CORBA_WCHAR, TCKind.from_int(TCKind._tk_wchar));
         PRIMITIVE_TYPECODES.put(CorbaConstants.NT_CORBA_OCTET, TCKind.from_int(TCKind._tk_octet));
+        PRIMITIVE_TYPECODES.put(CorbaConstants.NT_CORBA_USHORT, TCKind.from_int(TCKind._tk_ushort));
         PRIMITIVE_TYPECODES.put(CorbaConstants.NT_CORBA_SHORT, TCKind.from_int(TCKind._tk_short));
         PRIMITIVE_TYPECODES.put(CorbaConstants.NT_CORBA_LONG, TCKind.from_int(TCKind._tk_long));
         PRIMITIVE_TYPECODES.put(CorbaConstants.NT_CORBA_ULONG, TCKind.from_int(TCKind._tk_ulong));

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/extensions/CorbaOperationExtensionHelper.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/extensions/CorbaOperationExtensionHelper.java?rev=414662&r1=414661&r2=414662&view=diff
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/extensions/CorbaOperationExtensionHelper.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/extensions/CorbaOperationExtensionHelper.java
Thu Jun 15 12:52:40 2006
@@ -90,7 +90,7 @@
                         String idlType = paramAttrNode.getNodeValue();
                         int seperatorIndex = idlType.indexOf(':');
                         String prefix = idlType
-                                .substring(0, seperatorIndex - 1);
+                                .substring(0, seperatorIndex);
                         String localPart = idlType.substring(
                                 seperatorIndex + 1, idlType.length());
                         assert prefix.equals(CorbaConstants.NP_WSDL_CORBA);
@@ -111,7 +111,7 @@
                         String idlType = retAttrNode.getNodeValue();
                         int seperatorIndex = idlType.indexOf(':');
                         String prefix = idlType
-                                .substring(0, seperatorIndex - 1);
+                                .substring(0, seperatorIndex);
                         String localPart = idlType.substring(
                                 seperatorIndex + 1, idlType.length());
                         assert prefix.equals(CorbaConstants.NP_WSDL_CORBA);
@@ -130,7 +130,7 @@
                         String idlType = raiseAttrNode.getNodeValue();
                         int seperatorIndex = idlType.indexOf(':');
                         String prefix = idlType
-                                .substring(0, seperatorIndex - 1);
+                                .substring(0, seperatorIndex);
                         String localPart = idlType.substring(
                                 seperatorIndex + 1, idlType.length());
                         assert prefix.equals(CorbaConstants.NP_WSDL_CORBA);



Mime
View raw message