You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/09/15 21:07:03 UTC
svn commit: r289289 [34/134] - in /webservices/axis2/trunk/java: ./ etc/
modules/addressing/ modules/addressing/src/META-INF/
modules/addressing/src/org/apache/axis2/handlers/addressing/
modules/addressing/test-resources/ modules/addressing/test/org/ap...
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Deserializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Deserializer.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Deserializer.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Deserializer.java Thu Sep 15 11:52:11 2005
@@ -1,27 +1,27 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Deserializer
- */
-public interface Deserializer {
- public void deserialize(XMLStreamReader reader,
- DeserializationContext context) throws Exception;
- public void setTarget(DeserializationTarget target);
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding;
+
+import javax.xml.stream.XMLStreamReader;
+
+/**
+ * Deserializer
+ */
+public interface Deserializer {
+ public void deserialize(XMLStreamReader reader,
+ DeserializationContext context) throws Exception;
+ public void setTarget(DeserializationTarget target);
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Deserializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/DeserializerFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/DeserializerFactory.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/DeserializerFactory.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/DeserializerFactory.java Thu Sep 15 11:52:11 2005
@@ -1,23 +1,23 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding;
-
-/**
- * DeserializerFactory
- */
-public interface DeserializerFactory {
- public Deserializer getDeserializer();
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding;
+
+/**
+ * DeserializerFactory
+ */
+public interface DeserializerFactory {
+ public Deserializer getDeserializer();
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/DeserializerFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Holder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Holder.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Holder.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Holder.java Thu Sep 15 11:52:11 2005
@@ -1,22 +1,22 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding;
-
-/**
- * Holder
- */
-public interface Holder {
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding;
+
+/**
+ * Holder
+ */
+public interface Holder {
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Holder.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/MultiTarget.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/MultiTarget.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/MultiTarget.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/MultiTarget.java Thu Sep 15 11:52:11 2005
@@ -1,45 +1,45 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * A MultiTarget aggregates a bunch of targets into a single one.
- * This is used when multiple targets are waiting for a single SOAP
- * multiref deserialization, for instance.
- */
-public class MultiTarget implements DeserializationTarget {
- ArrayList targets = new ArrayList();
-
- /**
- * Add a target to the list of targets which will be updated when
- * we receive a value.
- *
- * @param target
- */
- public void addTarget(DeserializationTarget target) {
- targets.add(target);
- }
-
- public void setValue(Object value) throws Exception {
- for (Iterator i = targets.iterator(); i.hasNext();) {
- DeserializationTarget target = (DeserializationTarget) i.next();
- target.setValue(value);
- }
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * A MultiTarget aggregates a bunch of targets into a single one.
+ * This is used when multiple targets are waiting for a single SOAP
+ * multiref deserialization, for instance.
+ */
+public class MultiTarget implements DeserializationTarget {
+ ArrayList targets = new ArrayList();
+
+ /**
+ * Add a target to the list of targets which will be updated when
+ * we receive a value.
+ *
+ * @param target
+ */
+ public void addTarget(DeserializationTarget target) {
+ targets.add(target);
+ }
+
+ public void setValue(Object value) throws Exception {
+ for (Iterator i = targets.iterator(); i.hasNext();) {
+ DeserializationTarget target = (DeserializationTarget) i.next();
+ target.setValue(value);
+ }
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/MultiTarget.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializationContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializationContext.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializationContext.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializationContext.java Thu Sep 15 11:52:11 2005
@@ -1,220 +1,220 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding;
-
-import org.apache.axis.xsd.Constants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * SerializationContext
- */
-public class SerializationContext {
-
- protected Log log = LogFactory.getLog(getClass());
-
-
- // Multiref modes
- public static final int NO_MULTIREFS = 0;
- public static final int SOAP11_MULTIREFS = 1;
- public static final int SOAP12_MULTIREFS = 2;
-
- // Null handling modes
- public static final int NULL_OMIT = 0;
- public static final int NULL_NILLABLE = 1;
-
- static final QName MULTIREF_QNAME = new QName("MultiRef");
-
- Map multirefObjects = null;
- ArrayList multirefsToWrite = null;
-
- int multirefs = NO_MULTIREFS;
- int lastID = 0;
- boolean writingMultirefs = true;
-
- class Multiref {
- Object value;
- String id;
- Serializer serializer;
- }
-
- XMLStreamWriter writer = null;
-
- public SerializationContext(XMLStreamWriter writer) {
- this.writer = writer;
- }
-
- public void setMultirefBehavior(int multiref) {
- this.multirefs = multiref;
- }
-
- public void finish() throws Exception {
- while (multirefsToWrite != null) {
- // Writing actual data...
- writingMultirefs = false;
-
- ArrayList currentMultirefs = multirefsToWrite;
- multirefsToWrite = null;
-
- for (Iterator i = currentMultirefs.iterator(); i.hasNext();) {
- Multiref ref = (Multiref)i.next();
- writer.writeStartElement(MULTIREF_QNAME.getNamespaceURI(),
- MULTIREF_QNAME.getLocalPart());
- writer.writeAttribute("id", ref.id);
- ref.serializer.serializeData(ref.value, this);
- }
- }
- }
-
- public void serializeElement(QName qname,
- Object obj,
- Serializer serializer) throws Exception {
- serializeElement(qname, obj, NULL_OMIT, serializer);
- }
-
- public void serializeElement(QName qname,
- Object obj,
- int nullHandlingMode,
- Serializer serializer) throws Exception {
- if (obj == null) {
- switch (nullHandlingMode) {
- case NULL_NILLABLE:
- // write xsi:nil
- writer.writeStartElement(qname.getNamespaceURI(), qname.getLocalPart());
- writer.writeAttribute(Constants.URI_2001_SCHEMA_XSI,
- "nil",
- "true");
- writer.writeEndElement();
- default:
- return;
- }
-
- }
-
- writer.writeStartElement(qname.getNamespaceURI(), qname.getLocalPart());
- serializer.serialize(obj, this);
- }
-
- public void serializeData(Object obj, Serializer ser) throws Exception {
- ser.serialize(obj, this);
- }
-
- public boolean checkMultiref(Object obj, Serializer serializer)
- throws Exception {
- switch (multirefs) {
- case SOAP11_MULTIREFS: {
- String id = getSOAP11IDForObject(obj, serializer);
- writer.writeAttribute("href", "#" + id);
- writer.writeEndElement();
- return true;
- }
- case SOAP12_MULTIREFS: {
- String id = getSOAP12IDForObject(obj);
- if (id != null) {
- writer.writeAttribute("ref", "#" + id);
- writer.writeEndElement();
- return true;
- }
- id = getNewIDForObject(obj, serializer);
- writer.writeAttribute("id", id);
- }
- }
- return false;
- }
-
- /**
- * Obtain an ID for this object, which will be written (according to the
- * SOAP 1.1 multiref rules) as an independent element at the end of the
- * SOAP body - see finish()).
- *
- * @param obj
- * @return an ID, always. Either a new one or a previously registered one.
- */
- public String getSOAP11IDForObject(Object obj, Serializer serializer) {
- if (multirefObjects != null) {
- String id = (String)multirefObjects.get(obj);
- if (id != null) return id;
- }
-
- return getNewIDForObject(obj, serializer);
- }
-
- public String getSOAP12IDForObject(Object obj) {
- if (multirefObjects == null) return null;
- return (String)multirefObjects.get(obj);
- }
-
- public String getNewIDForObject(Object obj, Serializer serializer) {
- if (multirefObjects == null)
- multirefObjects = new HashMap();
- lastID++;
- String id = "" + lastID;
- multirefObjects.put(obj, id);
-
- if (multirefs == SOAP11_MULTIREFS) {
- if (multirefsToWrite == null)
- multirefsToWrite = new ArrayList();
- Multiref ref = new Multiref();
- ref.id = id;
- ref.value = obj;
- ref.serializer = serializer;
- multirefsToWrite.add(ref);
- }
-
- return "" + lastID;
- }
-
- public XMLStreamWriter getWriter() {
- return writer;
- }
-
- public String qName2String(QName qname) {
- return qName2String(qname, true);
- }
-
- public String qName2String(QName qname, boolean doDefault) {
- String ns = qname.getNamespaceURI();
- NamespaceContext ctx = writer.getNamespaceContext();
- try {
- String prefix = writer.getPrefix(ns);
- if (prefix != null) {
- // Got a prefix
- return prefix + ":" + qname.getLocalPart();
- } else if (prefix.equals("")) {
- if (doDefault) {
- // Default namespace, no prefix
- return qname.getLocalPart();
- }
-
- } else {
- // need to map this NS
- writer.writeNamespace(prefix, ns);
- }
- } catch (XMLStreamException e) {
- log.error(e.getMessage(), e);
- }
- return null;
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding;
+
+import org.apache.axis.xsd.Constants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * SerializationContext
+ */
+public class SerializationContext {
+
+ protected Log log = LogFactory.getLog(getClass());
+
+
+ // Multiref modes
+ public static final int NO_MULTIREFS = 0;
+ public static final int SOAP11_MULTIREFS = 1;
+ public static final int SOAP12_MULTIREFS = 2;
+
+ // Null handling modes
+ public static final int NULL_OMIT = 0;
+ public static final int NULL_NILLABLE = 1;
+
+ static final QName MULTIREF_QNAME = new QName("MultiRef");
+
+ Map multirefObjects = null;
+ ArrayList multirefsToWrite = null;
+
+ int multirefs = NO_MULTIREFS;
+ int lastID = 0;
+ boolean writingMultirefs = true;
+
+ class Multiref {
+ Object value;
+ String id;
+ Serializer serializer;
+ }
+
+ XMLStreamWriter writer = null;
+
+ public SerializationContext(XMLStreamWriter writer) {
+ this.writer = writer;
+ }
+
+ public void setMultirefBehavior(int multiref) {
+ this.multirefs = multiref;
+ }
+
+ public void finish() throws Exception {
+ while (multirefsToWrite != null) {
+ // Writing actual data...
+ writingMultirefs = false;
+
+ ArrayList currentMultirefs = multirefsToWrite;
+ multirefsToWrite = null;
+
+ for (Iterator i = currentMultirefs.iterator(); i.hasNext();) {
+ Multiref ref = (Multiref)i.next();
+ writer.writeStartElement(MULTIREF_QNAME.getNamespaceURI(),
+ MULTIREF_QNAME.getLocalPart());
+ writer.writeAttribute("id", ref.id);
+ ref.serializer.serializeData(ref.value, this);
+ }
+ }
+ }
+
+ public void serializeElement(QName qname,
+ Object obj,
+ Serializer serializer) throws Exception {
+ serializeElement(qname, obj, NULL_OMIT, serializer);
+ }
+
+ public void serializeElement(QName qname,
+ Object obj,
+ int nullHandlingMode,
+ Serializer serializer) throws Exception {
+ if (obj == null) {
+ switch (nullHandlingMode) {
+ case NULL_NILLABLE:
+ // write xsi:nil
+ writer.writeStartElement(qname.getNamespaceURI(), qname.getLocalPart());
+ writer.writeAttribute(Constants.URI_2001_SCHEMA_XSI,
+ "nil",
+ "true");
+ writer.writeEndElement();
+ default:
+ return;
+ }
+
+ }
+
+ writer.writeStartElement(qname.getNamespaceURI(), qname.getLocalPart());
+ serializer.serialize(obj, this);
+ }
+
+ public void serializeData(Object obj, Serializer ser) throws Exception {
+ ser.serialize(obj, this);
+ }
+
+ public boolean checkMultiref(Object obj, Serializer serializer)
+ throws Exception {
+ switch (multirefs) {
+ case SOAP11_MULTIREFS: {
+ String id = getSOAP11IDForObject(obj, serializer);
+ writer.writeAttribute("href", "#" + id);
+ writer.writeEndElement();
+ return true;
+ }
+ case SOAP12_MULTIREFS: {
+ String id = getSOAP12IDForObject(obj);
+ if (id != null) {
+ writer.writeAttribute("ref", "#" + id);
+ writer.writeEndElement();
+ return true;
+ }
+ id = getNewIDForObject(obj, serializer);
+ writer.writeAttribute("id", id);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Obtain an ID for this object, which will be written (according to the
+ * SOAP 1.1 multiref rules) as an independent element at the end of the
+ * SOAP body - see finish()).
+ *
+ * @param obj
+ * @return an ID, always. Either a new one or a previously registered one.
+ */
+ public String getSOAP11IDForObject(Object obj, Serializer serializer) {
+ if (multirefObjects != null) {
+ String id = (String)multirefObjects.get(obj);
+ if (id != null) return id;
+ }
+
+ return getNewIDForObject(obj, serializer);
+ }
+
+ public String getSOAP12IDForObject(Object obj) {
+ if (multirefObjects == null) return null;
+ return (String)multirefObjects.get(obj);
+ }
+
+ public String getNewIDForObject(Object obj, Serializer serializer) {
+ if (multirefObjects == null)
+ multirefObjects = new HashMap();
+ lastID++;
+ String id = "" + lastID;
+ multirefObjects.put(obj, id);
+
+ if (multirefs == SOAP11_MULTIREFS) {
+ if (multirefsToWrite == null)
+ multirefsToWrite = new ArrayList();
+ Multiref ref = new Multiref();
+ ref.id = id;
+ ref.value = obj;
+ ref.serializer = serializer;
+ multirefsToWrite.add(ref);
+ }
+
+ return "" + lastID;
+ }
+
+ public XMLStreamWriter getWriter() {
+ return writer;
+ }
+
+ public String qName2String(QName qname) {
+ return qName2String(qname, true);
+ }
+
+ public String qName2String(QName qname, boolean doDefault) {
+ String ns = qname.getNamespaceURI();
+ NamespaceContext ctx = writer.getNamespaceContext();
+ try {
+ String prefix = writer.getPrefix(ns);
+ if (prefix != null) {
+ // Got a prefix
+ return prefix + ":" + qname.getLocalPart();
+ } else if (prefix.equals("")) {
+ if (doDefault) {
+ // Default namespace, no prefix
+ return qname.getLocalPart();
+ }
+
+ } else {
+ // need to map this NS
+ writer.writeNamespace(prefix, ns);
+ }
+ } catch (XMLStreamException e) {
+ log.error(e.getMessage(), e);
+ }
+ return null;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializationContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Serializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Serializer.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Serializer.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Serializer.java Thu Sep 15 11:52:11 2005
@@ -1,29 +1,29 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding;
-
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.AxisFault;
-
-/**
- * Serializer
- */
-public interface Serializer {
- void serialize(Object object, SerializationContext context)
- throws Exception;
- void serializeData(Object object, SerializationContext context)
- throws Exception;
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.AxisFault;
+
+/**
+ * Serializer
+ */
+public interface Serializer {
+ void serialize(Object object, SerializationContext context)
+ throws Exception;
+ void serializeData(Object object, SerializationContext context)
+ throws Exception;
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/Serializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializerFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializerFactory.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializerFactory.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializerFactory.java Thu Sep 15 11:52:11 2005
@@ -1,23 +1,23 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding;
-
-/**
- * SerializerFactory
- */
-public interface SerializerFactory {
- public Serializer getSerializer() throws Exception;
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding;
+
+/**
+ * SerializerFactory
+ */
+public interface SerializerFactory {
+ public Serializer getSerializer() throws Exception;
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/SerializerFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/beans/BeanPropertyDescriptor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/beans/BeanPropertyDescriptor.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/beans/BeanPropertyDescriptor.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/beans/BeanPropertyDescriptor.java Thu Sep 15 11:52:11 2005
@@ -1,84 +1,84 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding.beans;
-
-import org.apache.axis2.databinding.metadata.FieldAccessor;
-import org.apache.axis2.databinding.metadata.IndexedFieldAccessor;
-
-import java.lang.reflect.Method;
-
-/**
- * BeanPropertyDescriptor
- */
-public class BeanPropertyDescriptor implements FieldAccessor, IndexedFieldAccessor {
- Method readMethod;
- Method writeMethod;
- Method indexedReadMethod;
- Method indexedWriteMethod;
-
- public Method getReadMethod() {
- return readMethod;
- }
-
- public void setReadMethod(Method readMethod) {
- this.readMethod = readMethod;
- }
-
- public Method getWriteMethod() {
- return writeMethod;
- }
-
- public void setWriteMethod(Method writeMethod) {
- this.writeMethod = writeMethod;
- }
-
- public Method getIndexedReadMethod() {
- return indexedReadMethod;
- }
-
- public void setIndexedReadMethod(Method indexedReadMethod) {
- this.indexedReadMethod = indexedReadMethod;
- }
-
- public Method getIndexedWriteMethod() {
- return indexedWriteMethod;
- }
-
- public void setIndexedWriteMethod(Method indexedWriteMethod) {
- this.indexedWriteMethod = indexedWriteMethod;
- }
-
- public Object getValue(Object targetObject) throws Exception {
- return readMethod.invoke(targetObject, null);
- }
-
- public void setValue(Object targetObject, Object value) throws Exception {
- writeMethod.invoke(targetObject, new Object [] { value });
- }
-
- public Object getIndexedValue(Object targetObject, int index)
- throws Exception {
- return indexedReadMethod.invoke(targetObject,
- new Object [] { new Integer(index) });
- }
-
- public void setIndexedValue(Object targetObject,
- Object value,
- int index) throws Exception {
- indexedWriteMethod.invoke(targetObject,
- new Object [] { new Integer(index), value });
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding.beans;
+
+import org.apache.axis2.databinding.metadata.FieldAccessor;
+import org.apache.axis2.databinding.metadata.IndexedFieldAccessor;
+
+import java.lang.reflect.Method;
+
+/**
+ * BeanPropertyDescriptor
+ */
+public class BeanPropertyDescriptor implements FieldAccessor, IndexedFieldAccessor {
+ Method readMethod;
+ Method writeMethod;
+ Method indexedReadMethod;
+ Method indexedWriteMethod;
+
+ public Method getReadMethod() {
+ return readMethod;
+ }
+
+ public void setReadMethod(Method readMethod) {
+ this.readMethod = readMethod;
+ }
+
+ public Method getWriteMethod() {
+ return writeMethod;
+ }
+
+ public void setWriteMethod(Method writeMethod) {
+ this.writeMethod = writeMethod;
+ }
+
+ public Method getIndexedReadMethod() {
+ return indexedReadMethod;
+ }
+
+ public void setIndexedReadMethod(Method indexedReadMethod) {
+ this.indexedReadMethod = indexedReadMethod;
+ }
+
+ public Method getIndexedWriteMethod() {
+ return indexedWriteMethod;
+ }
+
+ public void setIndexedWriteMethod(Method indexedWriteMethod) {
+ this.indexedWriteMethod = indexedWriteMethod;
+ }
+
+ public Object getValue(Object targetObject) throws Exception {
+ return readMethod.invoke(targetObject, null);
+ }
+
+ public void setValue(Object targetObject, Object value) throws Exception {
+ writeMethod.invoke(targetObject, new Object [] { value });
+ }
+
+ public Object getIndexedValue(Object targetObject, int index)
+ throws Exception {
+ return indexedReadMethod.invoke(targetObject,
+ new Object [] { new Integer(index) });
+ }
+
+ public void setIndexedValue(Object targetObject,
+ Object value,
+ int index) throws Exception {
+ indexedWriteMethod.invoke(targetObject,
+ new Object [] { new Integer(index), value });
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/beans/BeanPropertyDescriptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializer.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializer.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializer.java Thu Sep 15 11:52:11 2005
@@ -1,101 +1,101 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding.deserializers;
-
-import org.apache.axis2.databinding.DeserializationContext;
-import org.apache.axis2.databinding.Deserializer;
-import org.apache.axis2.databinding.DeserializationTarget;
-import org.apache.axis2.databinding.metadata.TypeDesc;
-import org.apache.axis2.databinding.metadata.AttributeDesc;
-import org.apache.axis2.databinding.metadata.ElementDesc;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.namespace.QName;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * BeanDeserializer
- */
-public class BeanDeserializer implements Deserializer {
- private DeserializationTarget target;
-
- TypeDesc typeDesc;
- Object targetObject;
- Class javaClass;
-
- public BeanDeserializer(TypeDesc typeDesc) {
- this.typeDesc = typeDesc;
- this.javaClass = typeDesc.getJavaClass();
- }
-
- public void deserialize(XMLStreamReader reader,
- DeserializationContext context) throws Exception {
- targetObject = createTargetObject();
- Map elementCounts = new HashMap();
-
- // Get the attributes
- for (Iterator i = typeDesc.getAttributeDescs(); i.hasNext();) {
- AttributeDesc attrDesc = (AttributeDesc)i.next();
- QName qname = attrDesc.getQName();
- String val = reader.getAttributeValue(qname.getNamespaceURI(),
- qname.getLocalPart());
- if (val != null) {
- Object value =
- ((SimpleDeserializer)attrDesc.getDeserializer(0)).
- makeValue(val);
- attrDesc.setValue(targetObject, value);
- }
- }
-
- boolean done = false;
- while (!done) {
- int event = reader.next();
- if (event == XMLStreamConstants.END_ELEMENT) {
- target.setValue(targetObject);
- return;
- }
- if (event == XMLStreamConstants.END_DOCUMENT) {
- throw new Exception("Unfinished element!");
- }
-
- if (event == XMLStreamConstants.START_ELEMENT) {
- // Work through the child elements
- QName elementName = reader.getName();
- ElementDesc desc = typeDesc.getElementDesc(elementName);
- if (desc != null) {
- Integer count = (Integer)elementCounts.get(elementName);
- if (count == null) count = new Integer(0);
- elementCounts.put(elementName,
- new Integer(count.intValue() + 1));
- Deserializer dser =
- desc.getDeserializer(count.intValue(), targetObject);
- context.deserialize(reader, dser);
- }
- }
- }
- }
-
- private Object createTargetObject() throws Exception {
- return javaClass.newInstance();
- }
-
- public void setTarget(DeserializationTarget target) {
- this.target = target;
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding.deserializers;
+
+import org.apache.axis2.databinding.DeserializationContext;
+import org.apache.axis2.databinding.Deserializer;
+import org.apache.axis2.databinding.DeserializationTarget;
+import org.apache.axis2.databinding.metadata.TypeDesc;
+import org.apache.axis2.databinding.metadata.AttributeDesc;
+import org.apache.axis2.databinding.metadata.ElementDesc;
+
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * BeanDeserializer
+ */
+public class BeanDeserializer implements Deserializer {
+ private DeserializationTarget target;
+
+ TypeDesc typeDesc;
+ Object targetObject;
+ Class javaClass;
+
+ public BeanDeserializer(TypeDesc typeDesc) {
+ this.typeDesc = typeDesc;
+ this.javaClass = typeDesc.getJavaClass();
+ }
+
+ public void deserialize(XMLStreamReader reader,
+ DeserializationContext context) throws Exception {
+ targetObject = createTargetObject();
+ Map elementCounts = new HashMap();
+
+ // Get the attributes
+ for (Iterator i = typeDesc.getAttributeDescs(); i.hasNext();) {
+ AttributeDesc attrDesc = (AttributeDesc)i.next();
+ QName qname = attrDesc.getQName();
+ String val = reader.getAttributeValue(qname.getNamespaceURI(),
+ qname.getLocalPart());
+ if (val != null) {
+ Object value =
+ ((SimpleDeserializer)attrDesc.getDeserializer(0)).
+ makeValue(val);
+ attrDesc.setValue(targetObject, value);
+ }
+ }
+
+ boolean done = false;
+ while (!done) {
+ int event = reader.next();
+ if (event == XMLStreamConstants.END_ELEMENT) {
+ target.setValue(targetObject);
+ return;
+ }
+ if (event == XMLStreamConstants.END_DOCUMENT) {
+ throw new Exception("Unfinished element!");
+ }
+
+ if (event == XMLStreamConstants.START_ELEMENT) {
+ // Work through the child elements
+ QName elementName = reader.getName();
+ ElementDesc desc = typeDesc.getElementDesc(elementName);
+ if (desc != null) {
+ Integer count = (Integer)elementCounts.get(elementName);
+ if (count == null) count = new Integer(0);
+ elementCounts.put(elementName,
+ new Integer(count.intValue() + 1));
+ Deserializer dser =
+ desc.getDeserializer(count.intValue(), targetObject);
+ context.deserialize(reader, dser);
+ }
+ }
+ }
+ }
+
+ private Object createTargetObject() throws Exception {
+ return javaClass.newInstance();
+ }
+
+ public void setTarget(DeserializationTarget target) {
+ this.target = target;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializerFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializerFactory.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializerFactory.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializerFactory.java Thu Sep 15 11:52:11 2005
@@ -1,35 +1,35 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding.deserializers;
-
-import org.apache.axis2.databinding.DeserializerFactory;
-import org.apache.axis2.databinding.Deserializer;
-import org.apache.axis2.databinding.metadata.TypeDesc;
-
-/**
- * BeanDeserializerFactory
- */
-public class BeanDeserializerFactory implements DeserializerFactory {
- TypeDesc typeDesc;
-
- public BeanDeserializerFactory(TypeDesc typeDesc) {
- this.typeDesc = typeDesc;
- }
-
- public Deserializer getDeserializer() {
- return new BeanDeserializer(typeDesc);
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding.deserializers;
+
+import org.apache.axis2.databinding.DeserializerFactory;
+import org.apache.axis2.databinding.Deserializer;
+import org.apache.axis2.databinding.metadata.TypeDesc;
+
+/**
+ * BeanDeserializerFactory
+ */
+public class BeanDeserializerFactory implements DeserializerFactory {
+ TypeDesc typeDesc;
+
+ public BeanDeserializerFactory(TypeDesc typeDesc) {
+ this.typeDesc = typeDesc;
+ }
+
+ public Deserializer getDeserializer() {
+ return new BeanDeserializer(typeDesc);
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/BeanDeserializerFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/CollectionDeserializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/CollectionDeserializer.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/CollectionDeserializer.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/CollectionDeserializer.java Thu Sep 15 11:52:11 2005
@@ -1,41 +1,41 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding.deserializers;
-
-import org.apache.axis2.databinding.Deserializer;
-import org.apache.axis2.databinding.DeserializationContext;
-import org.apache.axis2.databinding.DeserializationTarget;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * CollectionDeserializer
- */
-public class CollectionDeserializer implements Deserializer {
- Deserializer itemDeserializer;
-
- public void deserialize(XMLStreamReader reader, DeserializationContext context) throws Exception {
- // strip the wrapper element.
- reader.next();
-
- // Now deserialize each inner element
- itemDeserializer.deserialize(reader, context);
- }
-
- public void setTarget(DeserializationTarget target) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding.deserializers;
+
+import org.apache.axis2.databinding.Deserializer;
+import org.apache.axis2.databinding.DeserializationContext;
+import org.apache.axis2.databinding.DeserializationTarget;
+
+import javax.xml.stream.XMLStreamReader;
+
+/**
+ * CollectionDeserializer
+ */
+public class CollectionDeserializer implements Deserializer {
+ Deserializer itemDeserializer;
+
+ public void deserialize(XMLStreamReader reader, DeserializationContext context) throws Exception {
+ // strip the wrapper element.
+ reader.next();
+
+ // Now deserialize each inner element
+ itemDeserializer.deserialize(reader, context);
+ }
+
+ public void setTarget(DeserializationTarget target) {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/CollectionDeserializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializer.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializer.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializer.java Thu Sep 15 11:52:11 2005
@@ -1,351 +1,351 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding.deserializers;
-
-import org.apache.axis2.databinding.DeserializationTarget;
-import org.apache.axis2.databinding.DeserializationContext;
-import org.apache.axis2.databinding.Deserializer;
-import org.apache.axis2.databinding.metadata.TypeDesc;
-import org.apache.axis2.i18n.Messages;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamConstants;
-import java.lang.reflect.Constructor;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-import java.util.GregorianCalendar;
-import java.text.SimpleDateFormat;
-
-/**
- * SimpleDeserializer
- */
-public class SimpleDeserializer implements Deserializer {
- private static SimpleDateFormat zulu =
- new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- // 0123456789 0 123456789
-
- static {
- zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
- }
-
- private static final Class[] STRING_STRING_CLASS =
- new Class [] {String.class, String.class};
-
- public static final Class[] STRING_CLASS =
- new Class [] {String.class};
-
- Class javaType;
- QName xmlType;
- Constructor constructor;
- XMLStreamReader reader;
- TypeDesc typeDesc;
- DeserializationTarget target;
-
- public SimpleDeserializer(Class javaType, QName xmlType) {
- this.javaType = javaType;
- this.xmlType = xmlType;
- }
-
- public void setTypeDesc(TypeDesc typeDesc) {
- this.typeDesc = typeDesc;
- }
-
- public void setTarget(DeserializationTarget target) {
- this.target = target;
- }
-
- public void deserialize(XMLStreamReader reader,
- DeserializationContext context) throws Exception {
- this.reader = reader;
- // We're expecting text and then an end element.
- int eventType;
- String text = new String();
- while ((eventType = reader.next()) != XMLStreamConstants.END_DOCUMENT) {
- if (eventType == XMLStreamConstants.START_ELEMENT) {
- int numAttrs = reader.getAttributeCount();
- eventType = reader.next();
- System.out.println("There are " + numAttrs + " attr(s)");
- }
- if (eventType == XMLStreamConstants.CHARACTERS) {
- text = text.concat(reader.getText());
- }
- if (eventType == XMLStreamConstants.END_ELEMENT) {
- // End of element
- target.setValue(makeValue(text));
- return;
- }
- }
- throw new Exception("End of document reached prematurely!");
- }
-
- /**
- * Convert the string that has been accumulated into an Object. Subclasses
- * may override this. Note that if the javaType is a primitive, the returned
- * object is a wrapper class.
- * @param source the serialized value to be deserialized
- * @throws Exception any exception thrown by this method will be wrapped
- */
- public Object makeValue(String source) throws Exception
- {
- if (javaType == java.lang.String.class) {
- return source;
- }
-
- // Trim whitespace if non-String
- source = source.trim();
-
- if (source.length() == 0) {
- return null;
- }
-
- // if constructor is set skip all basic java type checks
- if (this.constructor == null) {
- Object value = makeBasicValue(source);
- if (value != null) {
- return value;
- }
- }
-
- Object [] args = null;
-
- boolean isQNameSubclass = QName.class.isAssignableFrom(javaType);
-
- if (isQNameSubclass) {
- int colon = source.lastIndexOf(":");
- String namespace = colon < 0 ? "" :
- reader.getNamespaceURI(source.substring(0, colon));
- String localPart = colon < 0 ? source : source.substring(colon + 1);
- args = new Object [] {namespace, localPart};
- }
-
- if (constructor == null) {
- try {
- if (isQNameSubclass) {
- constructor =
- javaType.getDeclaredConstructor(STRING_STRING_CLASS);
- } else {
- constructor =
- javaType.getDeclaredConstructor(STRING_CLASS);
- }
- } catch (Exception e) {
- return null;
- }
- }
-
- if(constructor.getParameterTypes().length==0){
- try {
- Object obj = constructor.newInstance(new Object[]{});
- obj.getClass().getMethod("set_value", new Class[]{String.class})
- .invoke(obj, new Object[]{source});
- return obj;
- } catch (Exception e){
- //Ignore exception
- }
- }
- if (args == null) {
- args = new Object[]{source};
- }
- return constructor.newInstance(args);
- }
-
- private Object makeBasicValue(String source) throws Exception {
- // If the javaType is a boolean, except a number of different sources
- if (javaType == boolean.class ||
- javaType == Boolean.class) {
- // This is a pretty lame test, but it is what the previous code did.
- switch (source.charAt(0)) {
- case '0': case 'f': case 'F':
- return Boolean.FALSE;
-
- case '1': case 't': case 'T':
- return Boolean.TRUE;
-
- default:
- throw new NumberFormatException("Bad boolean expression");
- }
-
- }
-
- // If expecting a Float or a Double, need to accept some special cases.
- if (javaType == float.class ||
- javaType == java.lang.Float.class) {
- if (source.equals("NaN")) {
- return new Float(Float.NaN);
- } else if (source.equals("INF")) {
- return new Float(Float.POSITIVE_INFINITY);
- } else if (source.equals("-INF")) {
- return new Float(Float.NEGATIVE_INFINITY);
- } else {
- return new Float(source);
- }
- }
-
- if (javaType == double.class ||
- javaType == java.lang.Double.class) {
- if (source.equals("NaN")) {
- return new Double(Double.NaN);
- } else if (source.equals("INF")) {
- return new Double(Double.POSITIVE_INFINITY);
- } else if (source.equals("-INF")) {
- return new Double(Double.NEGATIVE_INFINITY);
- } else {
- return new Double(source);
- }
- }
-
- if (javaType == int.class ||
- javaType == java.lang.Integer.class) {
- return new Integer(source);
- }
-
- if (javaType == short.class ||
- javaType == java.lang.Short.class) {
- return new Short(source);
- }
-
- if (javaType == long.class ||
- javaType == java.lang.Long.class) {
- return new Long(source);
- }
-
- if (javaType == byte.class ||
- javaType == java.lang.Byte.class) {
- return new Byte(source);
- }
-
-/*
- if (javaType == org.apache.axis.types.URI.class) {
- return new org.apache.axis.types.URI(source);
- }
-*/
-
- if (javaType == Calendar.class) {
- return makeCalendar(source, false);
- }
-
- return null;
- }
-
- public static Object makeCalendar(String source, boolean returnDate) {
- Calendar calendar = Calendar.getInstance();
- Date date;
- boolean bc = false;
-
- // validate fixed portion of format
- if (source == null || source.length() == 0) {
- throw new NumberFormatException(
- Messages.getMessage("badDateTime00"));
- }
- if (source.charAt(0) == '+') {
- source = source.substring(1);
- }
- if (source.charAt(0) == '-') {
- source = source.substring(1);
- bc = true;
- }
- if (source.length() < 19) {
- throw new NumberFormatException(
- Messages.getMessage("badDateTime00"));
- }
- if (source.charAt(4) != '-' || source.charAt(7) != '-' ||
- source.charAt(10) != 'T') {
- throw new NumberFormatException(Messages.getMessage("badDate00"));
- }
- if (source.charAt(13) != ':' || source.charAt(16) != ':') {
- throw new NumberFormatException(Messages.getMessage("badTime00"));
- }
- // convert what we have validated so far
- try {
- synchronized (zulu) {
- date = zulu.parse(source.substring(0, 19) + ".000Z");
- }
- } catch (Exception e) {
- throw new NumberFormatException(e.toString());
- }
- int pos = 19;
-
- // parse optional milliseconds
- if (pos < source.length() && source.charAt(pos) == '.') {
- int milliseconds = 0;
- int start = ++pos;
- while (pos < source.length() &&
- Character.isDigit(source.charAt(pos))) {
- pos++;
- }
- String decimal = source.substring(start, pos);
- if (decimal.length() == 3) {
- milliseconds = Integer.parseInt(decimal);
- } else if (decimal.length() < 3) {
- milliseconds = Integer.parseInt((decimal + "000")
- .substring(0, 3));
- } else {
- milliseconds = Integer.parseInt(decimal.substring(0, 3));
- if (decimal.charAt(3) >= '5') {
- ++milliseconds;
- }
- }
-
- // add milliseconds to the current date
- date.setTime(date.getTime() + milliseconds);
- }
-
- // parse optional timezone
- if (pos + 5 < source.length() &&
- (source.charAt(pos) == '+' || (source.charAt(pos) == '-'))) {
- if (!Character.isDigit(source.charAt(pos + 1)) ||
- !Character.isDigit(source.charAt(pos + 2)) ||
- source.charAt(pos + 3) != ':' ||
- !Character.isDigit(source.charAt(pos + 4)) ||
- !Character.isDigit(source.charAt(pos + 5))) {
- throw new NumberFormatException(
- Messages.getMessage("badTimezone00"));
- }
- int hours = (source.charAt(pos + 1) - '0') * 10
- + source.charAt(pos + 2) - '0';
- int mins = (source.charAt(pos + 4) - '0') * 10
- + source.charAt(pos + 5) - '0';
- int milliseconds = (hours * 60 + mins) * 60 * 1000;
-
- // subtract milliseconds from current date to obtain GMT
- if (source.charAt(pos) == '+') {
- milliseconds = -milliseconds;
- }
- date.setTime(date.getTime() + milliseconds);
- pos += 6;
- }
- if (pos < source.length() && source.charAt(pos) == 'Z') {
- pos++;
- calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
- }
- if (pos < source.length()) {
- throw new NumberFormatException(Messages.getMessage("badChars00"));
- }
- calendar.setTime(date);
-
- // support dates before the Christian era
- if (bc) {
- calendar.set(Calendar.ERA, GregorianCalendar.BC);
- }
-
- if (returnDate) {
- return date;
- } else {
- return calendar;
- }
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding.deserializers;
+
+import org.apache.axis2.databinding.DeserializationTarget;
+import org.apache.axis2.databinding.DeserializationContext;
+import org.apache.axis2.databinding.Deserializer;
+import org.apache.axis2.databinding.metadata.TypeDesc;
+import org.apache.axis2.i18n.Messages;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
+import java.lang.reflect.Constructor;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+import java.util.GregorianCalendar;
+import java.text.SimpleDateFormat;
+
+/**
+ * SimpleDeserializer
+ */
+public class SimpleDeserializer implements Deserializer {
+ private static SimpleDateFormat zulu =
+ new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ // 0123456789 0 123456789
+
+ static {
+ zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
+ }
+
+ private static final Class[] STRING_STRING_CLASS =
+ new Class [] {String.class, String.class};
+
+ public static final Class[] STRING_CLASS =
+ new Class [] {String.class};
+
+ Class javaType;
+ QName xmlType;
+ Constructor constructor;
+ XMLStreamReader reader;
+ TypeDesc typeDesc;
+ DeserializationTarget target;
+
+ public SimpleDeserializer(Class javaType, QName xmlType) {
+ this.javaType = javaType;
+ this.xmlType = xmlType;
+ }
+
+ public void setTypeDesc(TypeDesc typeDesc) {
+ this.typeDesc = typeDesc;
+ }
+
+ public void setTarget(DeserializationTarget target) {
+ this.target = target;
+ }
+
+ public void deserialize(XMLStreamReader reader,
+ DeserializationContext context) throws Exception {
+ this.reader = reader;
+ // We're expecting text and then an end element.
+ int eventType;
+ String text = new String();
+ while ((eventType = reader.next()) != XMLStreamConstants.END_DOCUMENT) {
+ if (eventType == XMLStreamConstants.START_ELEMENT) {
+ int numAttrs = reader.getAttributeCount();
+ eventType = reader.next();
+ System.out.println("There are " + numAttrs + " attr(s)");
+ }
+ if (eventType == XMLStreamConstants.CHARACTERS) {
+ text = text.concat(reader.getText());
+ }
+ if (eventType == XMLStreamConstants.END_ELEMENT) {
+ // End of element
+ target.setValue(makeValue(text));
+ return;
+ }
+ }
+ throw new Exception("End of document reached prematurely!");
+ }
+
+ /**
+ * Convert the string that has been accumulated into an Object. Subclasses
+ * may override this. Note that if the javaType is a primitive, the returned
+ * object is a wrapper class.
+ * @param source the serialized value to be deserialized
+ * @throws Exception any exception thrown by this method will be wrapped
+ */
+ public Object makeValue(String source) throws Exception
+ {
+ if (javaType == java.lang.String.class) {
+ return source;
+ }
+
+ // Trim whitespace if non-String
+ source = source.trim();
+
+ if (source.length() == 0) {
+ return null;
+ }
+
+ // if constructor is set skip all basic java type checks
+ if (this.constructor == null) {
+ Object value = makeBasicValue(source);
+ if (value != null) {
+ return value;
+ }
+ }
+
+ Object [] args = null;
+
+ boolean isQNameSubclass = QName.class.isAssignableFrom(javaType);
+
+ if (isQNameSubclass) {
+ int colon = source.lastIndexOf(":");
+ String namespace = colon < 0 ? "" :
+ reader.getNamespaceURI(source.substring(0, colon));
+ String localPart = colon < 0 ? source : source.substring(colon + 1);
+ args = new Object [] {namespace, localPart};
+ }
+
+ if (constructor == null) {
+ try {
+ if (isQNameSubclass) {
+ constructor =
+ javaType.getDeclaredConstructor(STRING_STRING_CLASS);
+ } else {
+ constructor =
+ javaType.getDeclaredConstructor(STRING_CLASS);
+ }
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ if(constructor.getParameterTypes().length==0){
+ try {
+ Object obj = constructor.newInstance(new Object[]{});
+ obj.getClass().getMethod("set_value", new Class[]{String.class})
+ .invoke(obj, new Object[]{source});
+ return obj;
+ } catch (Exception e){
+ //Ignore exception
+ }
+ }
+ if (args == null) {
+ args = new Object[]{source};
+ }
+ return constructor.newInstance(args);
+ }
+
+ private Object makeBasicValue(String source) throws Exception {
+ // If the javaType is a boolean, except a number of different sources
+ if (javaType == boolean.class ||
+ javaType == Boolean.class) {
+ // This is a pretty lame test, but it is what the previous code did.
+ switch (source.charAt(0)) {
+ case '0': case 'f': case 'F':
+ return Boolean.FALSE;
+
+ case '1': case 't': case 'T':
+ return Boolean.TRUE;
+
+ default:
+ throw new NumberFormatException("Bad boolean expression");
+ }
+
+ }
+
+ // If expecting a Float or a Double, need to accept some special cases.
+ if (javaType == float.class ||
+ javaType == java.lang.Float.class) {
+ if (source.equals("NaN")) {
+ return new Float(Float.NaN);
+ } else if (source.equals("INF")) {
+ return new Float(Float.POSITIVE_INFINITY);
+ } else if (source.equals("-INF")) {
+ return new Float(Float.NEGATIVE_INFINITY);
+ } else {
+ return new Float(source);
+ }
+ }
+
+ if (javaType == double.class ||
+ javaType == java.lang.Double.class) {
+ if (source.equals("NaN")) {
+ return new Double(Double.NaN);
+ } else if (source.equals("INF")) {
+ return new Double(Double.POSITIVE_INFINITY);
+ } else if (source.equals("-INF")) {
+ return new Double(Double.NEGATIVE_INFINITY);
+ } else {
+ return new Double(source);
+ }
+ }
+
+ if (javaType == int.class ||
+ javaType == java.lang.Integer.class) {
+ return new Integer(source);
+ }
+
+ if (javaType == short.class ||
+ javaType == java.lang.Short.class) {
+ return new Short(source);
+ }
+
+ if (javaType == long.class ||
+ javaType == java.lang.Long.class) {
+ return new Long(source);
+ }
+
+ if (javaType == byte.class ||
+ javaType == java.lang.Byte.class) {
+ return new Byte(source);
+ }
+
+/*
+ if (javaType == org.apache.axis.types.URI.class) {
+ return new org.apache.axis.types.URI(source);
+ }
+*/
+
+ if (javaType == Calendar.class) {
+ return makeCalendar(source, false);
+ }
+
+ return null;
+ }
+
+ public static Object makeCalendar(String source, boolean returnDate) {
+ Calendar calendar = Calendar.getInstance();
+ Date date;
+ boolean bc = false;
+
+ // validate fixed portion of format
+ if (source == null || source.length() == 0) {
+ throw new NumberFormatException(
+ Messages.getMessage("badDateTime00"));
+ }
+ if (source.charAt(0) == '+') {
+ source = source.substring(1);
+ }
+ if (source.charAt(0) == '-') {
+ source = source.substring(1);
+ bc = true;
+ }
+ if (source.length() < 19) {
+ throw new NumberFormatException(
+ Messages.getMessage("badDateTime00"));
+ }
+ if (source.charAt(4) != '-' || source.charAt(7) != '-' ||
+ source.charAt(10) != 'T') {
+ throw new NumberFormatException(Messages.getMessage("badDate00"));
+ }
+ if (source.charAt(13) != ':' || source.charAt(16) != ':') {
+ throw new NumberFormatException(Messages.getMessage("badTime00"));
+ }
+ // convert what we have validated so far
+ try {
+ synchronized (zulu) {
+ date = zulu.parse(source.substring(0, 19) + ".000Z");
+ }
+ } catch (Exception e) {
+ throw new NumberFormatException(e.toString());
+ }
+ int pos = 19;
+
+ // parse optional milliseconds
+ if (pos < source.length() && source.charAt(pos) == '.') {
+ int milliseconds = 0;
+ int start = ++pos;
+ while (pos < source.length() &&
+ Character.isDigit(source.charAt(pos))) {
+ pos++;
+ }
+ String decimal = source.substring(start, pos);
+ if (decimal.length() == 3) {
+ milliseconds = Integer.parseInt(decimal);
+ } else if (decimal.length() < 3) {
+ milliseconds = Integer.parseInt((decimal + "000")
+ .substring(0, 3));
+ } else {
+ milliseconds = Integer.parseInt(decimal.substring(0, 3));
+ if (decimal.charAt(3) >= '5') {
+ ++milliseconds;
+ }
+ }
+
+ // add milliseconds to the current date
+ date.setTime(date.getTime() + milliseconds);
+ }
+
+ // parse optional timezone
+ if (pos + 5 < source.length() &&
+ (source.charAt(pos) == '+' || (source.charAt(pos) == '-'))) {
+ if (!Character.isDigit(source.charAt(pos + 1)) ||
+ !Character.isDigit(source.charAt(pos + 2)) ||
+ source.charAt(pos + 3) != ':' ||
+ !Character.isDigit(source.charAt(pos + 4)) ||
+ !Character.isDigit(source.charAt(pos + 5))) {
+ throw new NumberFormatException(
+ Messages.getMessage("badTimezone00"));
+ }
+ int hours = (source.charAt(pos + 1) - '0') * 10
+ + source.charAt(pos + 2) - '0';
+ int mins = (source.charAt(pos + 4) - '0') * 10
+ + source.charAt(pos + 5) - '0';
+ int milliseconds = (hours * 60 + mins) * 60 * 1000;
+
+ // subtract milliseconds from current date to obtain GMT
+ if (source.charAt(pos) == '+') {
+ milliseconds = -milliseconds;
+ }
+ date.setTime(date.getTime() + milliseconds);
+ pos += 6;
+ }
+ if (pos < source.length() && source.charAt(pos) == 'Z') {
+ pos++;
+ calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
+ }
+ if (pos < source.length()) {
+ throw new NumberFormatException(Messages.getMessage("badChars00"));
+ }
+ calendar.setTime(date);
+
+ // support dates before the Christian era
+ if (bc) {
+ calendar.set(Calendar.ERA, GregorianCalendar.BC);
+ }
+
+ if (returnDate) {
+ return date;
+ } else {
+ return calendar;
+ }
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializerFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializerFactory.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializerFactory.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializerFactory.java Thu Sep 15 11:52:11 2005
@@ -1,38 +1,38 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding.deserializers;
-
-import org.apache.axis2.databinding.DeserializerFactory;
-import org.apache.axis2.databinding.Deserializer;
-
-import javax.xml.namespace.QName;
-
-/**
- * SimpleDeserializerFactory
- */
-public class SimpleDeserializerFactory implements DeserializerFactory {
- QName xmlType;
- Class javaType;
-
- public SimpleDeserializerFactory(Class javaType, QName xmlType) {
- this.xmlType = xmlType;
- this.javaType = javaType;
- }
-
- public Deserializer getDeserializer() {
- return new SimpleDeserializer(javaType, xmlType);
- }
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding.deserializers;
+
+import org.apache.axis2.databinding.DeserializerFactory;
+import org.apache.axis2.databinding.Deserializer;
+
+import javax.xml.namespace.QName;
+
+/**
+ * SimpleDeserializerFactory
+ */
+public class SimpleDeserializerFactory implements DeserializerFactory {
+ QName xmlType;
+ Class javaType;
+
+ public SimpleDeserializerFactory(Class javaType, QName xmlType) {
+ this.xmlType = xmlType;
+ this.javaType = javaType;
+ }
+
+ public Deserializer getDeserializer() {
+ return new SimpleDeserializer(javaType, xmlType);
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/deserializers/SimpleDeserializerFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/metadata/AttributeDesc.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/metadata/AttributeDesc.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/metadata/AttributeDesc.java (original)
+++ webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/metadata/AttributeDesc.java Thu Sep 15 11:52:11 2005
@@ -1,24 +1,24 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.axis2.databinding.metadata;
-
-import org.apache.axis2.databinding.deserializers.SimpleDeserializer;
-
-/**
- * AttributeDesc
- */
-public class AttributeDesc extends FieldDesc {
-}
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.axis2.databinding.metadata;
+
+import org.apache.axis2.databinding.deserializers.SimpleDeserializer;
+
+/**
+ * AttributeDesc
+ */
+public class AttributeDesc extends FieldDesc {
+}
Propchange: webservices/axis2/trunk/java/modules/databinding/src/org/apache/axis2/databinding/metadata/AttributeDesc.java
------------------------------------------------------------------------------
svn:eol-style = native