cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r561849 - in /incubator/cxf/trunk: rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java
Date Wed, 01 Aug 2007 16:02:18 GMT
Author: dkulp
Date: Wed Aug  1 09:02:16 2007
New Revision: 561849

URL: http://svn.apache.org/viewvc?view=rev&rev=561849
Log:
[CXF-823] Fix for hexBin in RPC/Lit cases

Modified:
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?view=diff&rev=561849&r1=561848&r2=561849
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Wed Aug  1 09:02:16 2007
@@ -36,6 +36,7 @@
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
 import javax.xml.bind.attachment.AttachmentMarshaller;
 import javax.xml.bind.attachment.AttachmentUnmarshaller;
 import javax.xml.namespace.QName;
@@ -154,6 +155,11 @@
                     } else {
                         writeObject(u, source, new JAXBElement(elName, cls, mObj));
                     }
+                } else if (byte[].class == cls
+                    && part.getTypeQName() != null
+                    && part.getTypeQName().getLocalPart().equals("hexBinary")) {
+                    mObj = new HexBinaryAdapter().marshal((byte[])mObj);
+                    writeObject(u, source, new JAXBElement(elName, String.class, mObj));
                 } else {
                     writeObject(u, source, new JAXBElement(elName, cls, mObj));
                 }
@@ -256,6 +262,13 @@
                 return ret.toArray((Object[])java.lang.reflect.Array.newInstance(clazz.getComponentType(),
                                                                        ret.size()));
             }
+        } else if (byte[].class == clazz
+            && part != null 
+            && part.getTypeQName() != null
+            && part.getTypeQName().getLocalPart().equals("hexBinary")) {
+            
+            String obj = (String)unmarshall(context, schema, source, elName, String.class,
au, unwrap);
+            return new HexBinaryAdapter().unmarshal(obj);
         }
 
         Object o = unmarshall(context, schema, source, elName, clazz, au, unwrap);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java?view=diff&rev=561849&r1=561848&r2=561849
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java
Wed Aug  1 09:02:16 2007
@@ -48,7 +48,8 @@
     @WebService(serviceName = "SOAPService",
                 portName = "SOAPPort",
                 endpointInterface = "org.apache.type_test.rpc.TypeTestPortType",
-                targetNamespace = "http://apache.org/type_test/rpc")
+                targetNamespace = "http://apache.org/type_test/rpc",
+                wsdlLocation = "testutils/type_test/type_test_rpclit_soap.wsdl")
     class SOAPTypeTestImpl extends TypeTestImpl implements TypeTestPortType {
     }
 }



Mime
View raw message