cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r608894 [2/10] - in /incubator/cxf/trunk: ./ buildtools/src/main/resources/ common/schemas/src/main/resources/schemas/wsdl/ etc/eclipse/ maven-plugins/corba/ parent/ rt/bindings/corba/ rt/bindings/corba/src/main/java/org/apache/yoko/binding...
Date Fri, 04 Jan 2008 15:47:53 GMT
Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamFaultOutInterceptor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamFaultOutInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamFaultOutInterceptor.java Fri Jan  4 07:47:28 2008
@@ -24,14 +24,24 @@
 
 import java.util.Iterator;
 import java.util.List;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import javax.xml.bind.annotation.XmlType;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.ws.WebFault;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataWriter;
+import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
@@ -40,7 +50,6 @@
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.FaultInfo;
-import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -52,7 +61,6 @@
 import org.apache.yoko.bindings.corba.CorbaDestination;
 import org.apache.yoko.bindings.corba.CorbaMessage;
 import org.apache.yoko.bindings.corba.CorbaStreamable;
-import org.apache.yoko.bindings.corba.CorbaTypeMap;
 import org.apache.yoko.bindings.corba.runtime.CorbaFaultStreamWriter;
 import org.apache.yoko.bindings.corba.types.CorbaObjectHandler;
 
@@ -62,13 +70,11 @@
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.ServerRequest;
 import org.omg.CORBA.SystemException;
-import org.omg.CORBA.SystemExceptionHelper;
+//import org.omg.CORBA.SystemExceptionHelper;
 
 public class CorbaStreamFaultOutInterceptor extends AbstractPhaseInterceptor<Message> {
 
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaStreamFaultOutInterceptor.class);
-    private CorbaTypeMap typeMap;
-    private ServiceInfo service;
     private ORB orb;
 
     public CorbaStreamFaultOutInterceptor() {
@@ -79,6 +85,7 @@
         CorbaMessage message = (CorbaMessage) msg;
         Exchange exchange = message.getExchange();
         CorbaDestination destination;
+        Fault faultEx = null;
         if (message.getDestination() != null) {
             destination = (CorbaDestination)message.getDestination();
         } else {
@@ -89,14 +96,22 @@
         if (orb == null) {
             orb = (ORB) exchange.get(ORB.class); 
         }
-
-        service = exchange.get(ServiceInfo.class);
-        typeMap = message.getCorbaTypeMap();
         
         DataWriter<XMLStreamWriter> writer = getDataWriter(message);
 
         Throwable ex = message.getContent(Exception.class);
-        ex = ex.getCause();
+        // JCGS. If the cause is not available I can only continue if the exception 
+        //       is a Fault instance and contains a detail object.
+        if (ex.getCause() == null) {
+            if ((ex instanceof Fault) && (((Fault)ex).getDetail() != null)) {
+                faultEx = (Fault) ex;
+            } else {
+                throw new CorbaBindingException(ex);
+            }
+        } else {
+            ex = ex.getCause();
+        }
+       
         if (ex instanceof InvocationTargetException) {
             ex = ex.getCause();
         }
@@ -105,21 +120,27 @@
             setSystemException(message, ex);
             return;
         }
-
-        //REVISIT, we should not have to depend on WebFault annotation
-        //Try changing the fault name to the proper mangled java exception classname.
-        WebFault fault = ex.getClass().getAnnotation(WebFault.class);
-        if (fault == null) {
-            throw new CorbaBindingException(ex);
+        
+        String exClassName = null;
+        if (faultEx == null) {
+            //REVISIT, we should not have to depend on WebFault annotation
+            //Try changing the fault name to the proper mangled java exception classname.
+            WebFault fault = ex.getClass().getAnnotation(WebFault.class);
+            if (fault == null) {
+                throw new CorbaBindingException(ex);
+            }
+            exClassName = fault.name();
+        }  else {
+            //JCGS: exClassName to be set to the exception name
+            Element faultElement = (Element) faultEx.getDetail().getFirstChild();
+            exClassName = faultElement.getLocalName();
         }
-        String exClassName = fault.name();
 
         // Get information about the operation being invoked from the WSDL
         // definition.
         // We need this to marshal data correctly
 
-        BindingInfo bInfo = destination.getBindingInfo();
-        InterfaceInfo info = bInfo.getInterface();        
+        BindingInfo bInfo = destination.getBindingInfo();     
         
         String opName = message.getExchange().get(String.class);
                 
@@ -139,22 +160,28 @@
         }
 
         OperationInfo opInfo = bopInfo.getOperationInfo();
-
-        RaisesType exType = null;
-        List<RaisesType> exList = opType.getRaises();
-        for (Iterator<RaisesType> i = exList.iterator(); i.hasNext();) {
-            // REVISIT: Note that this assumes that exception names need to
-            // be unique. We should make
-            // sure that this is really the case.
-            RaisesType raises = i.next();
-            if (raises.getException().getLocalPart().equals(exClassName)) {
-                exType = raises;
-                break;
+        
+        if (faultEx != null) {
+            MessagePartInfo partInfo = getFaultMessagePartInfo(opInfo, new QName("", exClassName));
+            if (partInfo != null) {
+                exClassName = partInfo.getTypeQName().getLocalPart();
             }
+            
         }
+
+        RaisesType exType = getRaisesType(opType, exClassName, ex);
+
         try {
             if (exType != null) {
-                setUserException(message, ex, exType, opInfo, writer);
+                if (faultEx != null) {
+                    setUserExceptionFromFaultDetail(message, 
+                            faultEx.getDetail(), 
+                            exType, opInfo, writer,
+                            exchange.get(ServiceInfo.class));
+                } else {
+                    setUserException(message, ex, exType, opInfo, writer,
+                                    exchange.get(ServiceInfo.class));
+                }
             } else {
                 throw new CorbaBindingException(ex);
             }
@@ -163,13 +190,48 @@
         }
     }
 
+    protected RaisesType getRaisesType(OperationType opType, String exClassName, Throwable ex) {
+        RaisesType result = null;
+        List<RaisesType> exList = opType.getRaises();
+        result = findRaisesType(exList, exClassName);
+
+        if (result == null) {
+            //REVISIT, need to find a better way to match the corba binding exception name with the wsdl one
+            //if doc-literal, the part element name should be used, but for RPC, the message part name
+            try {
+                Method faultMethod = ex.getClass().getMethod("getFaultInfo");
+                if (faultMethod != null) {
+                    Class<?> faultClass = faultMethod.getReturnType();
+                    XmlType exType = faultClass.getAnnotation(XmlType.class);
+                    exClassName = exType.name();
+                    result = findRaisesType(exList, exClassName);
+                }
+            } catch (Exception exp) {
+                //Ignore it
+            }
+        }
+        return result;
+    }
+
+    protected RaisesType findRaisesType(List<RaisesType> exList, String exClassName) {
+        RaisesType result = null;
+        for (Iterator<RaisesType> i = exList.iterator(); i.hasNext();) {
+            RaisesType raises = i.next();
+            if (raises.getException().getLocalPart().equals(exClassName)) {
+                result = raises;
+                break;
+            }
+        }
+        return result;
+    }
+
     protected void setSystemException(CorbaMessage message,
                                       Throwable ex) {
         SystemException sysEx = (SystemException)ex;
         message.setSystemException(sysEx);
         ServerRequest request  = message.getExchange().get(ServerRequest.class);
         Any exAny = orb.create_any();
-        SystemExceptionHelper.insert(exAny, sysEx);
+        //SystemExceptionHelper.insert(exAny, sysEx);
         request.set_exception(exAny);
     }
 
@@ -177,7 +239,8 @@
                                     Throwable ex,
                                     RaisesType exType,
                                     OperationInfo opInfo,
-                                    DataWriter<XMLStreamWriter> writer)
+                                    DataWriter<XMLStreamWriter> writer,
+                                    ServiceInfo service)
         throws Exception {
         QName exIdlType = exType.getException();
         QName elName = new QName("", exIdlType.getLocalPart());
@@ -199,7 +262,8 @@
             fault = faultClass.newInstance();
         }
         
-        CorbaFaultStreamWriter faultWriter = new CorbaFaultStreamWriter(orb, exType, typeMap, service);
+        CorbaFaultStreamWriter faultWriter = new CorbaFaultStreamWriter(orb, exType, 
+                message.getCorbaTypeMap(), service);
         writer.write(fault, faultPart, faultWriter);
 
         CorbaObjectHandler[] objs = faultWriter.getCorbaObjects();      
@@ -207,6 +271,47 @@
         message.setStreamableException(streamable);
     }
 
+    protected void setUserExceptionFromFaultDetail(CorbaMessage message,
+                                                   org.w3c.dom.Element faultDetail,
+                                                   RaisesType exType,
+                                                   OperationInfo opInfo,
+                                                   DataWriter<XMLStreamWriter> writer,
+                                                   ServiceInfo service)
+        throws Exception {
+        QName exIdlType = exType.getException();
+        QName elName = new QName("", exIdlType.getLocalPart());
+        MessagePartInfo faultPart = getFaultMessagePartInfo(opInfo, elName);
+        
+        // faultDetailt.getFirstChild() skips the "detail" element
+        Object fault = extractPartsInfoFromDetail((Element) faultDetail.getFirstChild(), exType);
+
+        
+        CorbaFaultStreamWriter faultWriter = new CorbaFaultStreamWriter(orb, exType, 
+                                                message.getCorbaTypeMap(), service);
+        writer.write(fault, faultPart, faultWriter);
+
+        CorbaObjectHandler[] objs = faultWriter.getCorbaObjects();      
+        CorbaStreamable streamable = message.createStreamableObject(objs[0], elName);
+        message.setStreamableException(streamable);
+    }
+    
+    private Object extractPartsInfoFromDetail(Element faultDetail, RaisesType exType) {
+        Document faultDoc = DOMUtils.createDocument();
+        Element faultElement = faultDoc.createElement(exType.getException().getLocalPart());
+        faultDoc.appendChild(faultElement);
+       
+        NodeList nodeList = faultDetail.getChildNodes();
+        
+        for (int i = 0; i < nodeList.getLength(); i++) { 
+            Node importedFaultData = faultDoc.importNode(nodeList.item(i), true);
+            faultElement.appendChild(importedFaultData);
+        }
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("Exception DOM: " + XMLUtils.toString(faultElement));
+        }
+        return faultDoc;
+    }
+    
     protected DataWriter<XMLStreamWriter> getDataWriter(CorbaMessage message) {
         Service serviceModel = ServiceModelUtil.getService(message.getExchange());
 
@@ -222,8 +327,12 @@
         Iterator<FaultInfo> faults = opInfo.getFaults().iterator();
         while (faults.hasNext()) {
             FaultInfo fault = faults.next();
-            if (fault.getFaultName().getLocalPart().equals(faultName.getLocalPart())) {
-                return fault.getMessageParts().get(0);
+            MessagePartInfo partInfo = fault.getMessageParts().get(0);
+            if (partInfo.isElement()
+                && partInfo.getElementQName().getLocalPart().equals(faultName.getLocalPart())) {
+                return partInfo;
+            } else if (partInfo.getTypeQName().getLocalPart().equals(faultName.getLocalPart())) {
+                return partInfo;
             }
         }
         return null;

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamInInterceptor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/interceptors/CorbaStreamInInterceptor.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServant.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServant.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServant.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaDSIServant.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaFaultStreamWriter.java Fri Jan  4 07:47:28 2008
@@ -37,8 +37,6 @@
 
 public class CorbaFaultStreamWriter extends CorbaStreamWriter {
 
-    private static final Logger LOG = LogUtils.getL7dLogger(CorbaFaultStreamWriter.class);
-
     private RaisesType exType;
 
     public CorbaFaultStreamWriter(ORB orbRef,

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectReader.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -45,6 +45,7 @@
 import org.apache.yoko.bindings.corba.types.CorbaFixedHandler;
 import org.apache.yoko.bindings.corba.types.CorbaObjectHandler;
 import org.apache.yoko.bindings.corba.types.CorbaObjectReferenceHandler;
+import org.apache.yoko.bindings.corba.types.CorbaOctetSequenceHandler;
 import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
 import org.apache.yoko.bindings.corba.types.CorbaSequenceHandler;
 import org.apache.yoko.bindings.corba.types.CorbaStructHandler;
@@ -147,7 +148,7 @@
     // -- primitive types --
     public Boolean readBoolean() throws CorbaBindingException {
         try {
-            return new Boolean(stream.read_boolean());
+            return stream.read_boolean();
         } catch (org.omg.CORBA.MARSHAL ex) {
             LOG.log(Level.SEVERE, "CorbaObjectReader: could not read boolean");
             throw new CorbaBindingException("CorbaObjectReader: readBoolean MARSHAL exception", ex);
@@ -393,49 +394,46 @@
     }
 
     public void readSequence(CorbaObjectHandler obj) throws CorbaBindingException {
-        CorbaSequenceHandler sequenceObj = (CorbaSequenceHandler)obj;
-        List<CorbaObjectHandler> seqElements = sequenceObj.getElements();
-        int length = stream.read_ulong();
-        long bound = 0;
-        QName elementName = null;
-        if (obj.getType() instanceof Anonsequence) {
-            Anonsequence anonSeqType = (Anonsequence) obj.getType();
-            bound = anonSeqType.getBound();
-            elementName = anonSeqType.getElemname();
+        if (obj instanceof CorbaOctetSequenceHandler) {
+            int length = stream.read_ulong();
+            byte[] value = new byte[length];
+            stream.read_octet_array(value, 0, length);
+            ((CorbaOctetSequenceHandler) obj).setValue(value);
         } else {
-            Sequence seqType = (Sequence) obj.getType();
-            bound = seqType.getBound();
-            elementName = seqType.getElemname();
-        }
-        List<CorbaObjectHandler> elements = new ArrayList<CorbaObjectHandler>(length);
-        
-        // Simply checking the bound won't handle our recursive types.  We need to check for the
-        // existance of template, which will be present for all unbounded sequences and for bound
-        // sequences with recursive type elements.  Use the template element to construct each
-        // object that is in the input stream.
-        //if (bound == 0) {
-        if (sequenceObj.getTemplateElement() != null) {
-            sequenceObj.clear();
-            CorbaObjectHandler template = sequenceObj.getTemplateElement();
-            for (int i = 0; i < length; ++i) {
-                CorbaObjectHandler seqElement;
-                if (i < seqElements.size()) {
-                    seqElement = seqElements.get(i);
-                } else {
-                    seqElement = initializeCorbaObjectHandler(template);
+            CorbaSequenceHandler sequenceObj = (CorbaSequenceHandler)obj;
+            List<CorbaObjectHandler> seqElements = sequenceObj.getElements();
+            int length = stream.read_ulong();
+
+            List<CorbaObjectHandler> elements = new ArrayList<CorbaObjectHandler>(length);
+            
+            // Simply checking the bound won't handle our recursive types.  We need to check for the
+            // existance of template, which will be present for all unbounded sequences and for bound
+            // sequences with recursive type elements.  Use the template element to construct each
+            // object that is in the input stream.
+            //if (bound == 0) {
+            if (sequenceObj.getTemplateElement() != null) {
+                sequenceObj.clear();
+                CorbaObjectHandler template = sequenceObj.getTemplateElement();
+                for (int i = 0; i < length; ++i) {
+                    CorbaObjectHandler seqElement;
+                    if (i < seqElements.size()) {
+                        seqElement = seqElements.get(i);
+                    } else {
+                        seqElement = initializeCorbaObjectHandler(template);
+                    }
+                    read(seqElement);
+                    elements.add(seqElement);
+                }
+                sequenceObj.setElements(elements);
+            } else {
+                // We have a bounded sequence and the object should already be pre-built
+                for (int i = 0; i < length; ++i) {
+                    read(seqElements.get(i));
                 }
-                read(seqElement);
-                elements.add(seqElement);
-            }
-            sequenceObj.setElements(elements);
-        } else {
-            // We have a bounded sequence and the object should already be pre-built
-            for (int i = 0; i < length; ++i) {
-                read(seqElements.get(i));
             }
         }
     }
-    
+
     public void readObjectReference(CorbaObjectHandler obj) throws CorbaBindingException {
         CorbaObjectReferenceHandler objRefObj = (CorbaObjectReferenceHandler)obj;
         org.omg.CORBA.Object objRef = stream.read_Object();

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriter.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriter.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaObjectWriter.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -34,6 +34,7 @@
 import org.apache.yoko.bindings.corba.types.CorbaFixedHandler;
 import org.apache.yoko.bindings.corba.types.CorbaObjectHandler;
 import org.apache.yoko.bindings.corba.types.CorbaObjectReferenceHandler;
+import org.apache.yoko.bindings.corba.types.CorbaOctetSequenceHandler;
 import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
 import org.apache.yoko.bindings.corba.types.CorbaSequenceHandler;
 import org.apache.yoko.bindings.corba.types.CorbaStructHandler;
@@ -254,7 +255,6 @@
             OutputStream os = a.create_output_stream();
             CorbaObjectWriter writer = new CorbaObjectWriter(os);
             writer.write(containedType);
-            org.omg.CORBA.portable.InputStream instream = os.create_input_stream();
             a.read_value(os.create_input_stream(), containedType.getTypeCode());
         }
         stream.write_any(a);
@@ -325,12 +325,18 @@
     }
 
     public void writeSequence(CorbaObjectHandler obj) throws CorbaBindingException {
-        CorbaSequenceHandler seqHandler = (CorbaSequenceHandler)obj;
-        List<CorbaObjectHandler> seqElements = seqHandler.getElements();
-        int length = seqElements.size();
-        stream.write_ulong(length);
-        for (int i = 0; i < length; ++i) {
-            this.write(seqElements.get(i));
+        if (obj instanceof CorbaOctetSequenceHandler) {
+            byte[] value = ((CorbaOctetSequenceHandler) obj).getValue();
+            stream.write_ulong(value.length);
+            stream.write_octet_array(value, 0, value.length);
+        } else {
+            CorbaSequenceHandler seqHandler = (CorbaSequenceHandler)obj;
+            List<CorbaObjectHandler> seqElements = seqHandler.getElements();
+            int length = seqElements.size();
+            stream.write_ulong(length);
+            for (int i = 0; i < length; ++i) {
+                this.write(seqElements.get(i));
+            }
         }
     }
     

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReader.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReader.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamReader.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -32,14 +32,9 @@
 import org.apache.yoko.bindings.corba.types.CorbaTypeEventProducer;
 
 public class CorbaStreamReader implements XMLStreamReader {
-        
-    private char[] currentText;
+     
     private CorbaTypeEventProducer eventProducer;
     private int currentState;
-    private QName currentQName;
-    private List<Attribute> currentAttributes;
-
-    private String defaultNameSpace;
     
     public CorbaStreamReader(CorbaTypeEventProducer evProducer) {
         eventProducer = evProducer;
@@ -47,13 +42,11 @@
     }
 
     public QName getName() {
-        currentQName = eventProducer.getName();
-        return currentQName;
+        return eventProducer.getName();
     }
 
     public char[] getTextCharacters() {
-        currentText = eventProducer.getText().toCharArray();
-        return currentText;
+        return eventProducer.getText().toCharArray();
     }
 
     public int getEventType() {
@@ -61,7 +54,7 @@
     }
 
     public String getLocalName() {
-        return currentQName.getLocalPart();
+        return getName().getLocalPart();
     }
 
     public String getNamespaceURI() {
@@ -94,7 +87,7 @@
     }
 
     public int getTextLength() {
-        return currentText.length;
+        return eventProducer.getText().length();
     }
 
     public boolean isStartElement() {
@@ -114,7 +107,7 @@
     }
 
     public int getAttributeCount() {
-        currentAttributes =  eventProducer.getAttributes();
+        List<Attribute> currentAttributes =  eventProducer.getAttributes();
         if (currentAttributes != null) {
             return currentAttributes.size();
         }
@@ -123,6 +116,7 @@
 
     public String getAttributeLocalName(int arg0) {
         String ret = null;
+        List<Attribute> currentAttributes = eventProducer.getAttributes();
         if (currentAttributes != null) {
             Attribute a = currentAttributes.get(arg0);
             if (a != null) {
@@ -134,6 +128,7 @@
 
     public QName getAttributeName(int arg0) {
         QName ret = null;
+        List<Attribute> currentAttributes = eventProducer.getAttributes();
         if (currentAttributes != null) {
             Attribute a = currentAttributes.get(arg0);
             if (a != null) {
@@ -146,6 +141,7 @@
  
     public String getAttributeNamespace(int arg0) {
         String ret = null;
+        List<Attribute> currentAttributes = eventProducer.getAttributes();
         if (currentAttributes != null) {
             Attribute a = currentAttributes.get(arg0);
             if (a != null) {
@@ -165,6 +161,7 @@
 
     public String getAttributeValue(int arg0) {
         String ret = null;
+        List<Attribute> currentAttributes = eventProducer.getAttributes();
         if (currentAttributes != null) {
             Attribute a = currentAttributes.get(arg0);
             if (a != null) {
@@ -289,7 +286,7 @@
     }
 
     public String getText() {
-        throw new RuntimeException("Not implemented");
+        return eventProducer.getText();
     }
 
     public int getTextCharacters(int arg0, char[] arg1, int arg2, int arg3) throws XMLStreamException {

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamWriter.java Fri Jan  4 07:47:28 2008
@@ -44,8 +44,6 @@
 
 public class CorbaStreamWriter implements XMLStreamWriter {
 
-    private static final Logger LOG = LogUtils.getL7dLogger(CorbaStreamWriter.class);
-
     protected String defaultNS = "";
     protected CorbaTypeListener[] listeners;
     protected ServiceInfo serviceInfo;
@@ -61,6 +59,8 @@
     private QName wrapElementName;    
 
     private boolean skipWrap;
+    
+    private NamespaceContext ctx;
 
     public CorbaStreamWriter(ORB orbRef,
                              CorbaTypeMap map,
@@ -291,12 +291,11 @@
 
     public void setNamespaceContext(NamespaceContext context)
         throws XMLStreamException {
-        throw new XMLStreamException("Not yet implemented");
+        this.ctx = context;
     }
 
     public NamespaceContext getNamespaceContext() {
-        //return ctx;
-        return null;
+        return ctx;
     }
 
     public java.lang.Object getProperty(java.lang.String name)

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableImpl.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableImpl.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/runtime/CorbaStreamableImpl.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractCorbaTypeListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractCorbaTypeListener.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractCorbaTypeListener.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractCorbaTypeListener.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractNoStartEndEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractNoStartEndEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractNoStartEndEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractNoStartEndEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,3 +1,21 @@
+/**
+ * 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.yoko.bindings.corba.types;
 
 import java.util.Iterator;

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractStartEndEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractStartEndEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractStartEndEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/AbstractStartEndEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnonStructEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnonStructEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnonStructEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnonStructEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,3 +1,21 @@
+/**
+ * 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.yoko.bindings.corba.types;
 
 import org.apache.cxf.service.model.ServiceInfo;

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyHandler.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyHandler.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyListener.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyListener.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaAnyListener.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayHandler.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayHandler.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayListener.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayListener.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaArrayListener.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumHandler.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumHandler.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumListener.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumListener.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaEnumListener.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionHandler.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionHandler.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionListener.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionListener.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaExceptionListener.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedHandler.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedListener.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedListener.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaFixedListener.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaHandlerUtils.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -99,7 +99,11 @@
                 handler = new CorbaFixedHandler(name, idlType, tc, type);
                 break;
             case TCKind._tk_sequence:
-                handler = new CorbaSequenceHandler(name, idlType, tc, type);
+                if (isOctets(type)) {
+                    handler = new CorbaOctetSequenceHandler(name, idlType, tc, type);
+                } else {
+                    handler = new CorbaSequenceHandler(name, idlType, tc, type);
+                }
                 break;
             case TCKind._tk_struct:
                 handler = new CorbaStructHandler(name, idlType, tc, type);
@@ -152,7 +156,9 @@
                 initializeExceptionHandler(orb, obj, typeMap, serviceInfo, seenTypes);
                 break;
             case TCKind._tk_sequence:
-                initializeSequenceHandler(orb, obj, typeMap, serviceInfo, seenTypes);
+                if (!isOctets(obj.getType())) {
+                    initializeSequenceHandler(orb, obj, typeMap, serviceInfo, seenTypes);
+                }
                 break;
             case TCKind._tk_struct:
                 initializeStructHandler(orb, obj, typeMap, serviceInfo, seenTypes);
@@ -433,8 +439,13 @@
                 result = new CorbaFixedListener(handler);
                 break;
             case TCKind._tk_sequence:
-                handler = new CorbaSequenceHandler(name, idlType, tc, type);
-                result = new CorbaSequenceListener(handler, typeMap, orb, serviceInfo);
+                if (isOctets(type)) {
+                    handler = new CorbaOctetSequenceHandler(name, idlType, tc, type);
+                    result = new CorbaOctetSequenceListener(handler);
+                } else {
+                    handler = new CorbaSequenceHandler(name, idlType, tc, type);
+                    result = new CorbaSequenceListener(handler, typeMap, orb, serviceInfo);
+                }
                 break;
             case TCKind._tk_string:
             case TCKind._tk_wstring:

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectHandler.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectHandler.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceHandler.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceHandler.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceHandler.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaObjectReferenceListener.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceEventProducer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceEventProducer.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceEventProducer.java (original)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceEventProducer.java Fri Jan  4 07:47:28 2008
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -25,25 +25,18 @@
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.codec.binary.Hex;
-
-import org.apache.yoko.wsdl.W3CConstants;
-
 public class CorbaOctetSequenceEventProducer implements CorbaTypeEventProducer {
 
     int state;
     final int[] states = {XMLStreamReader.START_ELEMENT,
                           XMLStreamReader.CHARACTERS,
                           XMLStreamReader.END_ELEMENT};    
-    final CorbaSequenceHandler seqHandler;
+    final CorbaOctetSequenceHandler seqHandler;
     final QName name;
-    final boolean isBase64Octets;
 
     public CorbaOctetSequenceEventProducer(CorbaObjectHandler h) {
-        seqHandler = (CorbaSequenceHandler) h;
+        seqHandler = (CorbaOctetSequenceHandler) h;
         name = seqHandler.getName();
-        isBase64Octets = seqHandler.getType().getType().equals(W3CConstants.NT_SCHEMA_BASE64);
     }
 
     public String getLocalName() {        
@@ -55,19 +48,7 @@
     }
 
     public String getText() {
-        List<CorbaObjectHandler> elements = seqHandler.getElements();
-        byte[] bytes = new byte[elements.size()];
-        for (int i = 0; i < elements.size(); i++) {
-            CorbaPrimitiveHandler handler = (CorbaPrimitiveHandler) elements.get(i);
-            bytes[i] = ((Byte) handler.getValue()).byteValue();
-        }
-        String result;
-        if (isBase64Octets) {
-            result = new String(Base64.encodeBase64(bytes));
-        } else {
-            result = new String(Hex.encodeHex(bytes));
-        }
-        return result;
+        return seqHandler.getDataFromValue();
     }
 
     public int next() {

Added: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceHandler.java?rev=608894&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceHandler.java (added)
+++ incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceHandler.java Fri Jan  4 07:47:28 2008
@@ -0,0 +1,77 @@
+/**
+ * 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.yoko.bindings.corba.types;
+
+import javax.xml.namespace.QName;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.codec.binary.Hex;
+
+import org.apache.yoko.bindings.corba.CorbaBindingException;
+import org.apache.yoko.wsdl.W3CConstants;
+
+import org.omg.CORBA.TypeCode;
+
+public class CorbaOctetSequenceHandler extends CorbaObjectHandler {
+
+    private byte[] value;
+    private boolean isBase64Octets;
+    
+    public CorbaOctetSequenceHandler(QName primName,
+                                     QName primIdlType,
+                                     TypeCode primTC,
+                                     Object primType) {
+        super(primName, primIdlType, primTC, primType);
+        isBase64Octets = getType().getType().equals(W3CConstants.NT_SCHEMA_BASE64);
+    }
+    
+    public byte[] getValue() {
+        return value;
+    }    
+    
+    public void setValue(byte[] obj) {
+        value = obj;
+    }
+
+    public String getDataFromValue() {
+        String result;
+        if (isBase64Octets) {
+            result = new String(Base64.encodeBase64(value));
+        } else {
+            result = new String(Hex.encodeHex(value));
+        }
+        return result;
+    }
+    
+    public void setValueFromData(String data) {
+        try {
+            if (isBase64Octets) {
+                value = Base64.decodeBase64(data.getBytes());
+            } else {
+                value = Hex.decodeHex(data.toCharArray());
+            }
+        } catch (Exception ex) {
+            throw new CorbaBindingException("Not able to parse the octet sequence", ex);
+        }
+    }
+    
+    public void clear() {
+        value = null;
+    }
+}

Propchange: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/yoko/bindings/corba/types/CorbaOctetSequenceHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message