Author: thomas.diesler(a)jboss.com
Date: 2006-12-06 05:17:42 -0500 (Wed, 06 Dec 2006)
New Revision: 1569
Added:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/BindingException.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/DeserializerSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializationContext.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializerSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java
Removed:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializerFactory.java
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
Log:
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/BindingException.java
(from rev 1565,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java 2006-12-06
01:14:45 UTC (rev 1565)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/BindingException.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.binding;
+
+// $Id$
+
+/** An exception that may occur during message binding
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-Oct-2004
+ */
+public class BindingException extends Exception
+{
+ /**
+ * Constructs a new exception with <code>null</code> as its detail
message.
+ * The cause is not initialized, and may subsequently be initialized by a
+ * call to {@link #initCause}.
+ */
+ public BindingException()
+ {
+ }
+
+ /**
+ * Constructs a new exception with the specified detail message. The
+ * cause is not initialized, and may subsequently be initialized by
+ * a call to {@link #initCause}.
+ *
+ * @param message the detail message. The detail message is saved for
+ * later retrieval by the {@link #getMessage()} method.
+ */
+ public BindingException(String message)
+ {
+ super(message);
+ }
+
+ /**
+ * Constructs a new exception with the specified cause and a detail
+ * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+ * typically contains the class and detail message of <tt>cause</tt>).
+ * This constructor is useful for exceptions that are little more than
+ * wrappers for other throwables (for example, {@link
+ * java.security.PrivilegedActionException}).
+ *
+ * @param cause the cause (which is saved for later retrieval by the
+ * {@link #getCause()} method). (A <tt>null</tt> value is
+ * permitted, and indicates that the cause is nonexistent or
+ * unknown.)
+ * @since 1.4
+ */
+ public BindingException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ /**
+ * Constructs a new exception with the specified detail message and
+ * cause. <p>Note that the detail message associated with
+ * <code>cause</code> is <i>not</i> automatically incorporated
in
+ * this exception's detail message.
+ *
+ * @param message the detail message (which is saved for later retrieval
+ * by the {@link #getMessage()} method).
+ * @param cause the cause (which is saved for later retrieval by the
+ * {@link #getCause()} method). (A <tt>null</tt> value is
+ * permitted, and indicates that the cause is nonexistent or
+ * unknown.)
+ * @since 1.4
+ */
+ public BindingException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/DeserializerSupport.java
(from rev 1565,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2006-12-06
01:14:45 UTC (rev 1565)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/DeserializerSupport.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Deserializer;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.utils.XMLPredefinedEntityReferenceResolver;
+
+/** The base class for all Deserializers.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class DeserializerSupport implements Deserializer
+{
+
+ /** Deserialize an XML fragment to an object value
+ *
+ * @param xmlName The root element name of the resulting fragment
+ * @param xmlType The associated schema type
+ * @param xmlFragment The XML fragment to deserialize
+ * @param serContext The serialization context
+ */
+ public abstract Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException;
+
+ /** Unwrap the value string from the XML fragment
+ *
+ * @return The value string or null if the startTag contains a xsi:nil='true'
attribute
+ */
+ protected String unwrapValueStr(String xmlFragment)
+ {
+ // We only scan for :nil if the xmlFragment is an empty element
+ if (isEmptyElement(xmlFragment))
+ {
+ return (isNil(xmlFragment) ? null : "");
+ }
+
+ int endOfStartTag = xmlFragment.indexOf(">");
+ int startOfEndTag = xmlFragment.lastIndexOf("</");
+ if (endOfStartTag < 0 || startOfEndTag < 0)
+ throw new IllegalArgumentException("Invalid XML fragment: " +
xmlFragment);
+
+ String valueStr = xmlFragment.substring(endOfStartTag + 1, startOfEndTag);
+
+ return XMLPredefinedEntityReferenceResolver.resolve(valueStr);
+ }
+
+ protected boolean isEmptyElement(String xmlFragment)
+ {
+ return xmlFragment.startsWith("<") &&
xmlFragment.endsWith("/>");
+ }
+
+ protected boolean isNil(String xmlFragment)
+ {
+ boolean isNil = false;
+ if (isEmptyElement(xmlFragment))
+ {
+ int endOfStartTag = xmlFragment.indexOf(">");
+ String startTag = xmlFragment.substring(0, endOfStartTag);
+ isNil = startTag.indexOf(":nil='1'") > 0 ||
startTag.indexOf(":nil=\"1\"") > 0;
+ isNil = isNil || startTag.indexOf(":nil='true'") > 0 ||
startTag.indexOf(":nil=\"true\"") > 0;
+ }
+ return isNil;
+ }
+
+ public String getMechanismType()
+ {
+ throw new NotImplementedException();
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializationContext.java
(from rev 1567,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2006-12-06
01:43:00 UTC (rev 1567)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializationContext.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.binding;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.xb.binding.NamespaceRegistry;
+
+/**
+ * An abstract serialization context
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class SerializationContext
+{
+ // The type mapping that is valid for this serialization context
+ private TypeMappingImpl typeMapping;
+ // The namespace registry that is valid for this serialization context
+ private NamespaceRegistry namespaceRegistry = new NamespaceRegistry();
+ // An arbitrary property bag
+ private Map<Object, Object> properties = new HashMap<Object, Object>();
+
+ public Object getProperty(Object key)
+ {
+ return properties.get(key);
+ }
+
+ public void setProperty(Object key, Object value)
+ {
+ properties.put(key, value);
+ }
+
+ public TypeMappingImpl getTypeMapping()
+ {
+ return typeMapping;
+ }
+
+ public void setTypeMapping(TypeMappingImpl typeMapping)
+ {
+ this.typeMapping = typeMapping;
+ }
+
+ public NamespaceRegistry getNamespaceRegistry()
+ {
+ return namespaceRegistry;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializerSupport.java
(from rev 1565,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2006-12-06
01:14:45 UTC (rev 1565)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializerSupport.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,164 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Serializer;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.Constants;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * The base class for all Serializers.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 04-Dec-2004
+ */
+public abstract class SerializerSupport implements Serializer
+{
+ /** Serialize an object value to an XML fragment
+ *
+ * @param xmlName The root element name of the resulting fragment
+ * @param xmlType The associated schema type
+ * @param value The value to serialize
+ * @param serContext The serialization context
+ * @param attributes TODO
+ * @param attributes The attributes on this element
+ */
+ public abstract String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException;
+
+ /** Wrap the value string in a XML fragment with the given name
+ */
+ protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry
nsRegistry, NamedNodeMap attributes, boolean normalize)
+ {
+ String nsURI = xmlName.getNamespaceURI();
+ String localPart = xmlName.getLocalPart();
+ String prefix = xmlName.getPrefix();
+
+ StringBuilder nsAttr = new StringBuilder("");
+ if (attributes != null)
+ {
+ for (int i = 0; i < attributes.getLength(); i++)
+ {
+ Node attr = attributes.item(i);
+ String attrName = attr.getNodeName();
+ String attrValue = attr.getNodeValue();
+ nsAttr.append(" " + attrName + "='" + attrValue +
"'");
+ }
+ }
+
+ String elName;
+ if (nsURI.length() > 0)
+ {
+ xmlName = nsRegistry.registerQName(xmlName);
+ prefix = xmlName.getPrefix();
+ elName = prefix + ":" + localPart;
+
+ String xmlns = " xmlns:" + prefix + "='" + nsURI +
"'";
+ if (nsAttr.indexOf(xmlns) < 0)
+ {
+ nsAttr.append(xmlns);
+ }
+ }
+ else
+ {
+ elName = localPart;
+ }
+
+ String xmlFragment;
+ if (valueStr == null)
+ {
+ String xmlns = " xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'";
+ xmlFragment = "<" + elName + nsAttr + " " +
Constants.PREFIX_XSI + ":nil='1'" + xmlns + "/>";
+ }
+ else
+ {
+ if(normalize)
+ valueStr = normalize(valueStr);
+ xmlFragment = "<" + elName + nsAttr + ">" + valueStr +
"</" + elName + ">";
+ }
+
+ return xmlFragment;
+ }
+
+ public String getMechanismType()
+ {
+ throw new NotImplementedException();
+ }
+
+ private String normalize(String valueStr)
+ {
+ // We assume most strings will not contain characters that need
"escaping",
+ // and optimize for this case.
+ boolean found = false;
+ int i = 0;
+
+ outer: for (; i < valueStr.length(); i++)
+ {
+ switch (valueStr.charAt(i))
+ {
+ case '<':
+ case '>':
+ case '&':
+ case '"':
+ found = true;
+ break outer;
+ }
+ }
+
+ if (!found)
+ return valueStr;
+
+ // Resume where we left off
+ StringBuilder builder = new StringBuilder();
+ builder.append(valueStr.substring(0, i));
+ for (; i < valueStr.length(); i++)
+ {
+ char c = valueStr.charAt(i);
+ switch (c)
+ {
+ case '<':
+ builder.append("<");
+ break;
+ case '>':
+ builder.append(">");
+ break;
+ case '&':
+ builder.append("&");
+ break;
+ case '"':
+ builder.append(""");
+ break;
+ default:
+ builder.append(c);
+ }
+ }
+
+ return builder.toString();
+ }
+}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -30,9 +30,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.jaxrpc.encoding.*;
-import org.jboss.ws.core.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.core.jbossxb.JBossXBSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.*;
import org.w3c.dom.Element;
import java.awt.*;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -40,19 +40,19 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.encoding.Base64DeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.Base64SerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.CalendarDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.CalendarSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.DateDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.DateSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.HexDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.HexSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.QNameDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.QNameSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SimpleDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SimpleSerializerFactory;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxrpc.encoding.Base64DeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.Base64SerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
/**
* This is the representation of a type mapping.
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding (from
rev 1566, branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Deserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,79 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.extras.xop.XOPContext;
-import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
-import org.w3c.dom.Element;
-
-import java.io.IOException;
-/**
- * Deserializer for Base64
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class Base64Deserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(Base64Deserializer.class);
-
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- byte[] value = null;
-
- String valueStr = unwrapValueStr(xmlFragment);
- if(XOPContext.isXOPMessage())
- {
- try
- {
- Element xopInclude = DOMUtils.parse(valueStr);
- String cid = xopInclude.getAttribute("href");
- XOPUnmarshaller xopUnmarshaller = new XOPUnmarshallerImpl();
- value = xopUnmarshaller.getAttachmentAsByteArray(cid);
- }
- catch (IOException e)
- {
- throw new WSException("Failed to parse xopInclude element");
- }
- }
- else if (valueStr != null)
- {
- value = SimpleTypeBindings.unmarshalBase64(valueStr);
- }
- return value;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Deserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Deserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,79 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.extras.xop.XOPContext;
+import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
+import org.w3c.dom.Element;
+
+import java.io.IOException;
+/**
+ * Deserializer for Base64
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64Deserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(Base64Deserializer.class);
+
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ byte[] value = null;
+
+ String valueStr = unwrapValueStr(xmlFragment);
+ if(XOPContext.isXOPMessage())
+ {
+ try
+ {
+ Element xopInclude = DOMUtils.parse(valueStr);
+ String cid = xopInclude.getAttribute("href");
+ XOPUnmarshaller xopUnmarshaller = new XOPUnmarshallerImpl();
+ value = xopUnmarshaller.getAttachmentAsByteArray(cid);
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to parse xopInclude element");
+ }
+ }
+ else if (valueStr != null)
+ {
+ value = SimpleTypeBindings.unmarshalBase64(valueStr);
+ }
+ return value;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64DeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * DeserializerFactory for base64.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class Base64DeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new Base64Deserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64DeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64DeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * DeserializerFactory for base64.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64DeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new Base64Deserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Serializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,76 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.ws.extras.xop.XOPContext;
-import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
-import org.jboss.xb.binding.sunday.xop.XOPObject;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Serializer for base64
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class Base64Serializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(Base64Serializer.class);
-
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- String xmlFragment = null;
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
-
- if(XOPContext.isXOPMessage())
- {
- XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
- XOPObject xopObject = new XOPObject(value);
- xopObject.setContentType("application/octet-stream");
- String cid = xopMarshaller.addMtomAttachment(xopObject,
xmlName.getNamespaceURI(), xmlType.getLocalPart() );
- String xopInclude = "<xop:Include
xmlns:xop='http://www.w3.org/2004/08/xop/include'
href='"+cid+"'/>";
- xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, attributes, false);
- }
- else
- {
- value = JavaUtils.getPrimitiveValueArray(value);
- String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
- xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
- }
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Serializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Serializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.extras.xop.XOPContext;
+import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
+import org.jboss.xb.binding.sunday.xop.XOPObject;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for base64
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64Serializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(Base64Serializer.class);
+
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ String xmlFragment = null;
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+
+ if(XOPContext.isXOPMessage())
+ {
+ XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
+ XOPObject xopObject = new XOPObject(value);
+ xopObject.setContentType("application/octet-stream");
+ String cid = xopMarshaller.addMtomAttachment(xopObject,
xmlName.getNamespaceURI(), xmlType.getLocalPart() );
+ String xopInclude = "<xop:Include
xmlns:xop='http://www.w3.org/2004/08/xop/include'
href='"+cid+"'/>";
+ xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, attributes, false);
+ }
+ else
+ {
+ value = JavaUtils.getPrimitiveValueArray(value);
+ String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
+ xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+ }
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64SerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for base64Binary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class Base64SerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new Base64Serializer();
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64SerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64SerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for base64Binary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64SerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new Base64Serializer();
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Calendar;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- * @see <a
href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema
3.2.16</a>
- */
-public class CalendarDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(CalendarDeserializer.class);
-
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- Calendar value = null;
-
- String valueStr = unwrapValueStr(xmlFragment);
- if (valueStr != null)
- {
- value = SimpleTypeBindings.unmarshalDateTime(valueStr);
- }
-
- return value;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.util.Calendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ * @see <a
href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema
3.2.16</a>
+ */
+public class CalendarDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(CalendarDeserializer.class);
+
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ Calendar value = null;
+
+ String valueStr = unwrapValueStr(xmlFragment);
+ if (valueStr != null)
+ {
+ value = SimpleTypeBindings.unmarshalDateTime(valueStr);
+ }
+
+ return value;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,42 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A CalendarDeserializer Factory
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class CalendarDeserializerFactory extends DeserializerFactoryBase
-{
-
- public DeserializerSupport getDeserializer()
- {
- return new CalendarDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A CalendarDeserializer Factory
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class CalendarDeserializerFactory extends DeserializerFactoryBase
+{
+
+ public DeserializerSupport getDeserializer()
+ {
+ return new CalendarDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,58 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Calendar;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- * @see <a
href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema
3.2.16</a>
- */
-public class CalendarSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(CalendarSerializer.class);
-
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
-
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,58 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.util.Calendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ * @see <a
href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema
3.2.16</a>
+ */
+public class CalendarSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(CalendarSerializer.class);
+
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
+
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,39 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class CalendarSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new CalendarSerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class CalendarSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new CalendarSerializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,61 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class DateDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(DateDeserializer.class);
-
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- Date value = null;
-
- String valueStr = unwrapValueStr(xmlFragment);
- if (valueStr != null)
- {
- Calendar cal = SimpleTypeBindings.unmarshalDateTime(valueStr);
- value = cal.getTime();
- }
-
- return value;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(DateDeserializer.class);
+
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ Date value = null;
+
+ String valueStr = unwrapValueStr(xmlFragment);
+ if (valueStr != null)
+ {
+ Calendar cal = SimpleTypeBindings.unmarshalDateTime(valueStr);
+ value = cal.getTime();
+ }
+
+ return value;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A DateDeserializer Factory
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class DateDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new DateDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A DateDeserializer Factory
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new DateDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,68 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Serializer for Dates.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- * @see <a
href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema
3.2.16</a>
- */
-public class DateSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(DateSerializer.class);
-
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- if (value != null)
- {
- Calendar cal = new GregorianCalendar();
- cal.setTime((Date)value);
- value = cal;
- }
-
- String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
-
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for Dates.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ * @see <a
href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema
3.2.16</a>
+ */
+public class DateSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(DateSerializer.class);
+
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+ if (value != null)
+ {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime((Date)value);
+ value = cal;
+ }
+
+ String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
+
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for Date primitives
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class DateSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new DateSerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for Date primitives
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new DateSerializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DeserializerFactoryBase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,52 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Iterator;
-
-import javax.xml.rpc.encoding.Deserializer;
-import javax.xml.rpc.encoding.DeserializerFactory;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class DeserializerFactoryBase implements DeserializerFactory
-{
- public abstract DeserializerSupport getDeserializer() throws BindingException;
-
- public Deserializer getDeserializerAs(String mechanismType)
- {
- throw new NotImplementedException();
- }
-
- public Iterator getSupportedMechanismTypes()
- {
- throw new NotImplementedException();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DeserializerFactoryBase.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DeserializerFactoryBase.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.xml.rpc.encoding.Deserializer;
+import javax.xml.rpc.encoding.DeserializerFactory;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class DeserializerFactoryBase implements DeserializerFactory
+{
+ public abstract DeserializerSupport getDeserializer() throws BindingException;
+
+ public Deserializer getDeserializerAs(String mechanismType)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Iterator getSupportedMechanismTypes()
+ {
+ throw new NotImplementedException();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,65 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.w3c.dom.Element;
-
-/**
- * A deserializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jun-2005
- */
-public class ElementDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ElementDeserializer.class);
-
- /** Deserialize the given simple xmlString
- */
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- try
- {
- Element domElement = DOMUtils.parse(xmlFragment);
- return domElement;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new BindingException();
- }
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * A deserializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jun-2005
+ */
+public class ElementDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ElementDeserializer.class);
+
+ /** Deserialize the given simple xmlString
+ */
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+ try
+ {
+ Element domElement = DOMUtils.parse(xmlFragment);
+ return domElement;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new BindingException();
+ }
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class ElementDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new ElementDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class ElementDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new ElementDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,65 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * A serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class ElementSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ElementSerializer.class);
-
- /** Marshal the value for a given XMLSchema type
- * @param xmlType local part of the schema type
- * @param value the value to marshal
- * @param serContext
- * @return the string representation od the value
- */
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes)
- throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- if (value == null)
- throw new IllegalArgumentException("Element value cannot be null");
- if ((value instanceof Element) == false)
- throw new IllegalArgumentException("Value is not a Element: " +
value.getClass().getName());
-
- String xmlFragment = DOMWriter.printNode((Element)value, false);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class ElementSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ElementSerializer.class);
+
+ /** Marshal the value for a given XMLSchema type
+ * @param xmlType local part of the schema type
+ * @param value the value to marshal
+ * @param serContext
+ * @return the string representation od the value
+ */
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes)
+ throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+ if (value == null)
+ throw new IllegalArgumentException("Element value cannot be null");
+ if ((value instanceof Element) == false)
+ throw new IllegalArgumentException("Value is not a Element: " +
value.getClass().getName());
+
+ String xmlFragment = DOMWriter.printNode((Element)value, false);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-/**
- * A factory for a Serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jun-2005
- */
-public class ElementSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new ElementSerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jun-2005
+ */
+public class ElementSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new ElementSerializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-/**
- * Deserializer for hexBinary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- * @see <a
href="http://www.w3.org/TR/xmlschema-2/#hexBinary">XML Schema
3.2.16</a>
- */
-public class HexDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(HexDeserializer.class);
-
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- byte[] value = null;
-
- String valueStr = unwrapValueStr(xmlFragment);
- if (valueStr != null)
- {
- value = SimpleTypeBindings.unmarshalHexBinary(valueStr);
- }
-
- return value;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * Deserializer for hexBinary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ * @see <a
href="http://www.w3.org/TR/xmlschema-2/#hexBinary">XML Schema
3.2.16</a>
+ */
+public class HexDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HexDeserializer.class);
+
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ byte[] value = null;
+
+ String valueStr = unwrapValueStr(xmlFragment);
+ if (valueStr != null)
+ {
+ value = SimpleTypeBindings.unmarshalHexBinary(valueStr);
+ }
+
+ return value;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * DeserializerFactory for hexBinary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class HexDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new HexDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * DeserializerFactory for hexBinary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class HexDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new HexDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Serializer for hexBinary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- * @see <a
href="http://www.w3.org/TR/xmlschema-2/#hexBinary">XML Schema
3.2.16</a>
- */
-public class HexSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(HexSerializer.class);
-
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- value = JavaUtils.getPrimitiveValueArray(value);
- String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
-
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for hexBinary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ * @see <a
href="http://www.w3.org/TR/xmlschema-2/#hexBinary">XML Schema
3.2.16</a>
+ */
+public class HexSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HexSerializer.class);
+
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ value = JavaUtils.getPrimitiveValueArray(value);
+ String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
+
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for hexBinary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class HexSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new HexSerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for hexBinary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class HexSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new HexSerializer();
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBDeserializerFactory.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.core.jbossxb.JBossXBDeserializer;
+
+// $Id$
+
+/**
+ * A factory for a Deserializer that can handle complex types
+ * by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer() throws BindingException
+ {
+ return new JBossXBDeserializer();
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBSerializerFactory.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.core.jbossxb.JBossXBSerializer;
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle complex types
+ * by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer() throws BindingException
+ {
+ return new JBossXBSerializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/NullValueSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Serializer for null values.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Jun-2005
- */
-public class NullValueSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(NullValueSerializer.class);
-
- /**
- * Serializes an object null value.
- *
- * If a message part of an RPC parameter is defined like this
- *
- * <message name='SomeMessage'>
- * <part name='partName' element='someElement'/>
- * </message>
- *
- * it is possible that the element definition does not allow
- * null values. In that case an error should be generated.
- */
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- nsRegistry.registerURI(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
- String xmlFragment = wrapValueStr(xmlName, null, nsRegistry, attributes, true);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/NullValueSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/NullValueSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for null values.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Jun-2005
+ */
+public class NullValueSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(NullValueSerializer.class);
+
+ /**
+ * Serializes an object null value.
+ *
+ * If a message part of an RPC parameter is defined like this
+ *
+ * <message name='SomeMessage'>
+ * <part name='partName' element='someElement'/>
+ * </message>
+ *
+ * it is possible that the element definition does not allow
+ * null values. In that case an error should be generated.
+ */
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+ nsRegistry.registerURI(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
+ String xmlFragment = wrapValueStr(xmlName, null, nsRegistry, attributes, true);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,98 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.io.IOException;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class QNameDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(QNameDeserializer.class);
-
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- QName value = null;
-
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String valueStr = unwrapValueStr(xmlFragment, nsRegistry);
- if (valueStr != null)
- {
- value = SimpleTypeBindings.unmarshalQName(valueStr, nsRegistry);
- }
-
- return value;
- }
-
- /** Unwrap the value string from the XML fragment
- * @return The value string or null if the startTag contains a xsi:nil='true'
attribute
- */
- protected String unwrapValueStr(String xmlFragment, NamespaceRegistry nsRegistry)
- {
- if (isEmptyElement(xmlFragment) == false)
- {
- // Register namespace declarations
- try
- {
- Element el = DOMUtils.parse(xmlFragment);
- NamedNodeMap attribs = el.getAttributes();
- for (int i = 0; i < attribs.getLength(); i++)
- {
- Node attr = attribs.item(i);
- String nodeName = attr.getNodeName();
- if (nodeName.startsWith("xmlns:"))
- {
- String prefix = nodeName.substring(6);
- String nsURI = attr.getNodeValue();
- nsRegistry.registerURI(nsURI, prefix);
- }
- }
- }
- catch (IOException e)
- {
- throw new IllegalArgumentException("Cannot parse xmlFragment: " +
xmlFragment);
- }
- }
-
- return super.unwrapValueStr(xmlFragment);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(QNameDeserializer.class);
+
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ QName value = null;
+
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+ String valueStr = unwrapValueStr(xmlFragment, nsRegistry);
+ if (valueStr != null)
+ {
+ value = SimpleTypeBindings.unmarshalQName(valueStr, nsRegistry);
+ }
+
+ return value;
+ }
+
+ /** Unwrap the value string from the XML fragment
+ * @return The value string or null if the startTag contains a xsi:nil='true'
attribute
+ */
+ protected String unwrapValueStr(String xmlFragment, NamespaceRegistry nsRegistry)
+ {
+ if (isEmptyElement(xmlFragment) == false)
+ {
+ // Register namespace declarations
+ try
+ {
+ Element el = DOMUtils.parse(xmlFragment);
+ NamedNodeMap attribs = el.getAttributes();
+ for (int i = 0; i < attribs.getLength(); i++)
+ {
+ Node attr = attribs.item(i);
+ String nodeName = attr.getNodeName();
+ if (nodeName.startsWith("xmlns:"))
+ {
+ String prefix = nodeName.substring(6);
+ String nsURI = attr.getNodeValue();
+ nsRegistry.registerURI(nsURI, prefix);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ throw new IllegalArgumentException("Cannot parse xmlFragment: " +
xmlFragment);
+ }
+ }
+
+ return super.unwrapValueStr(xmlFragment);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,39 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class QNameDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new QNameDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new QNameDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,78 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Serializer for QNames.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class QNameSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(QNameSerializer.class);
-
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- QName qnameValue = (QName)value;
- String nsURI = qnameValue.getNamespaceURI();
-
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
-
- // Remove prefix and register again
- if (nsURI.length() > 0)
- {
- qnameValue = new QName(qnameValue.getNamespaceURI(),
qnameValue.getLocalPart());
- qnameValue = nsRegistry.registerQName(qnameValue);
- }
-
- String valueStr = SimpleTypeBindings.marshalQName(qnameValue, nsRegistry);
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
-
- // Insert the NS declaration for the qnameValue
- if (nsURI.length() > 0)
- {
- StringBuilder buffer = new StringBuilder(xmlFragment);
- int indexGT = xmlFragment.indexOf(">");
- String prefix = qnameValue.getPrefix();
- buffer.insert(indexGT, " xmlns:" + prefix + "='" + nsURI
+ "'");
- xmlFragment = buffer.toString();
- }
-
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,78 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for QNames.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(QNameSerializer.class);
+
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ QName qnameValue = (QName)value;
+ String nsURI = qnameValue.getNamespaceURI();
+
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+
+ // Remove prefix and register again
+ if (nsURI.length() > 0)
+ {
+ qnameValue = new QName(qnameValue.getNamespaceURI(),
qnameValue.getLocalPart());
+ qnameValue = nsRegistry.registerQName(qnameValue);
+ }
+
+ String valueStr = SimpleTypeBindings.marshalQName(qnameValue, nsRegistry);
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
+
+ // Insert the NS declaration for the qnameValue
+ if (nsURI.length() > 0)
+ {
+ StringBuilder buffer = new StringBuilder(xmlFragment);
+ int indexGT = xmlFragment.indexOf(">");
+ String prefix = qnameValue.getPrefix();
+ buffer.insert(indexGT, " xmlns:" + prefix + "='" + nsURI
+ "'");
+ xmlFragment = buffer.toString();
+ }
+
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for QName primitive
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class QNameSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new QNameSerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for QName primitive
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new QNameSerializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,189 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.umdm.ParameterMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-import org.w3c.dom.Element;
-
-/**
- * A Deserializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2005
- */
-public class SOAPArrayDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(SOAPArrayDeserializer.class);
-
- private DeserializerSupport compDeserializer;
-
- public SOAPArrayDeserializer() throws BindingException
- {
- }
-
- /**
- */
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- try
- {
- ParameterMetaData paramMetaData =
(ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
- QName compXmlType = paramMetaData.getSOAPArrayCompType();
- QName compXmlName = paramMetaData.getXmlName();
-
- Element arrayElement = DOMUtils.parse(xmlFragment);
- int[] arrDims = getDimensionsFromAttribute(arrayElement);
- Class compJavaType = getComponentTypeFromAttribute(arrayElement, serContext);
- Object[] retArray = (Object[])Array.newInstance(compJavaType, arrDims);
-
- TypeMappingImpl typeMapping = serContext.getTypeMapping();
- if (compXmlType == null)
- {
- compXmlType = typeMapping.getXMLType(compJavaType);
- paramMetaData.setSOAPArrayCompType(compXmlType);
- }
-
- if (compXmlType == null)
- throw new WSException("Cannot obtain component xmlType for: " +
compJavaType);
-
- // Get the component type deserializer factory
- log.debug("Get component deserializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
- DeserializerFactoryBase compDeserializerFactory =
(DeserializerFactoryBase)typeMapping.getDeserializer(compJavaType, compXmlType);
- if (compDeserializerFactory == null)
- {
- log.warn("Cannot obtain component deserializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
- compDeserializerFactory =
(DeserializerFactoryBase)typeMapping.getDeserializer(null, compXmlType);
- }
- if (compDeserializerFactory == null)
- throw new WSException("Cannot obtain component deserializer for: "
+ compXmlType);
-
- // Get the component type deserializer
- compDeserializer =
(DeserializerSupport)compDeserializerFactory.getDeserializer();
-
- if (arrDims.length < 1 || 2 < arrDims.length)
- throw new WSException("Unsupported array dimensions: " +
Arrays.asList(arrDims));
-
- Iterator it = DOMUtils.getChildElements(arrayElement);
- if (arrDims.length == 1)
- {
- Object[] subArr = retArray;
- deserializeMemberValues(compXmlName, compXmlType, serContext, it, subArr);
- }
- if (arrDims.length == 2)
- {
- for (int i = 0; i < arrDims[0]; i++)
- {
- Object[] subArr = (Object[])retArray[i];
- deserializeMemberValues(compXmlName, compXmlType, serContext, it,
subArr);
- }
- }
-
- log.debug("deserialized: " + retArray.getClass().getName());
- return retArray;
- }
- catch (RuntimeException e)
- {
- throw e;
- }
- catch (Exception e)
- {
- throw new BindingException(e);
- }
- }
-
- private void deserializeMemberValues(QName compXmlName, QName compXmlType,
SerializationContext serContext, Iterator it, Object[] subArr) throws BindingException
- {
- int dim = subArr.length;
- for (int i = 0; i < dim; i++)
- {
- Object compValue = null;
- if (it.hasNext())
- {
- Element childElement = (Element)it.next();
- String compXMLFragment = DOMWriter.printNode(childElement, false);
- compValue = compDeserializer.deserialize(compXmlName, compXmlType,
compXMLFragment, serContext);
- compValue = JavaUtils.getWrapperValueArray(compValue);
- }
- subArr[i] = compValue;
- }
- }
-
- private int[] getDimensionsFromAttribute(Element arrayElement)
- {
- QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
- QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
- if (arrayType == null)
- throw new WSException("Cannot obtain attribute: " + attrQName);
-
- String localPart = arrayType.getLocalPart();
- int dimIndex = localPart.indexOf("[");
-
- String dimStr = localPart.substring(dimIndex);
- StringTokenizer st = new StringTokenizer(dimStr, "[,]");
- int[] arrDims = new int[st.countTokens()];
- for (int i = 0; st.hasMoreTokens(); i++)
- arrDims[i] = new Integer(st.nextToken()).intValue();
-
- return arrDims;
- }
-
- private Class getComponentTypeFromAttribute(Element arrayElement, SerializationContext
serContext)
- {
- QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
- QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
- if (arrayType == null)
- throw new WSException("Cannot obtain attribute: " + attrQName);
-
- String nsURI = arrayType.getNamespaceURI();
- String localPart = arrayType.getLocalPart();
- int dimIndex = localPart.indexOf("[");
- QName compXmlType = new QName(nsURI, localPart.substring(0, dimIndex));
-
- TypeMappingImpl typeMapping = serContext.getTypeMapping();
- Class javaType = typeMapping.getJavaType(compXmlType);
- if (javaType == null)
- throw new WSException("Cannot obtain javaType for: " + compXmlType);
-
- return JavaUtils.getWrapperType(javaType);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,189 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.lang.reflect.Array;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.umdm.ParameterMetaData;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.w3c.dom.Element;
+
+/**
+ * A Deserializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArrayDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(SOAPArrayDeserializer.class);
+
+ private DeserializerSupport compDeserializer;
+
+ public SOAPArrayDeserializer() throws BindingException
+ {
+ }
+
+ /**
+ */
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+ try
+ {
+ ParameterMetaData paramMetaData =
(ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
+ QName compXmlType = paramMetaData.getSOAPArrayCompType();
+ QName compXmlName = paramMetaData.getXmlName();
+
+ Element arrayElement = DOMUtils.parse(xmlFragment);
+ int[] arrDims = getDimensionsFromAttribute(arrayElement);
+ Class compJavaType = getComponentTypeFromAttribute(arrayElement, serContext);
+ Object[] retArray = (Object[])Array.newInstance(compJavaType, arrDims);
+
+ TypeMappingImpl typeMapping = serContext.getTypeMapping();
+ if (compXmlType == null)
+ {
+ compXmlType = typeMapping.getXMLType(compJavaType);
+ paramMetaData.setSOAPArrayCompType(compXmlType);
+ }
+
+ if (compXmlType == null)
+ throw new WSException("Cannot obtain component xmlType for: " +
compJavaType);
+
+ // Get the component type deserializer factory
+ log.debug("Get component deserializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+ DeserializerFactoryBase compDeserializerFactory =
(DeserializerFactoryBase)typeMapping.getDeserializer(compJavaType, compXmlType);
+ if (compDeserializerFactory == null)
+ {
+ log.warn("Cannot obtain component deserializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+ compDeserializerFactory =
(DeserializerFactoryBase)typeMapping.getDeserializer(null, compXmlType);
+ }
+ if (compDeserializerFactory == null)
+ throw new WSException("Cannot obtain component deserializer for: "
+ compXmlType);
+
+ // Get the component type deserializer
+ compDeserializer =
(DeserializerSupport)compDeserializerFactory.getDeserializer();
+
+ if (arrDims.length < 1 || 2 < arrDims.length)
+ throw new WSException("Unsupported array dimensions: " +
Arrays.asList(arrDims));
+
+ Iterator it = DOMUtils.getChildElements(arrayElement);
+ if (arrDims.length == 1)
+ {
+ Object[] subArr = retArray;
+ deserializeMemberValues(compXmlName, compXmlType, serContext, it, subArr);
+ }
+ if (arrDims.length == 2)
+ {
+ for (int i = 0; i < arrDims[0]; i++)
+ {
+ Object[] subArr = (Object[])retArray[i];
+ deserializeMemberValues(compXmlName, compXmlType, serContext, it,
subArr);
+ }
+ }
+
+ log.debug("deserialized: " + retArray.getClass().getName());
+ return retArray;
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ private void deserializeMemberValues(QName compXmlName, QName compXmlType,
SerializationContext serContext, Iterator it, Object[] subArr) throws BindingException
+ {
+ int dim = subArr.length;
+ for (int i = 0; i < dim; i++)
+ {
+ Object compValue = null;
+ if (it.hasNext())
+ {
+ Element childElement = (Element)it.next();
+ String compXMLFragment = DOMWriter.printNode(childElement, false);
+ compValue = compDeserializer.deserialize(compXmlName, compXmlType,
compXMLFragment, serContext);
+ compValue = JavaUtils.getWrapperValueArray(compValue);
+ }
+ subArr[i] = compValue;
+ }
+ }
+
+ private int[] getDimensionsFromAttribute(Element arrayElement)
+ {
+ QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
+ QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
+ if (arrayType == null)
+ throw new WSException("Cannot obtain attribute: " + attrQName);
+
+ String localPart = arrayType.getLocalPart();
+ int dimIndex = localPart.indexOf("[");
+
+ String dimStr = localPart.substring(dimIndex);
+ StringTokenizer st = new StringTokenizer(dimStr, "[,]");
+ int[] arrDims = new int[st.countTokens()];
+ for (int i = 0; st.hasMoreTokens(); i++)
+ arrDims[i] = new Integer(st.nextToken()).intValue();
+
+ return arrDims;
+ }
+
+ private Class getComponentTypeFromAttribute(Element arrayElement, SerializationContext
serContext)
+ {
+ QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
+ QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
+ if (arrayType == null)
+ throw new WSException("Cannot obtain attribute: " + attrQName);
+
+ String nsURI = arrayType.getNamespaceURI();
+ String localPart = arrayType.getLocalPart();
+ int dimIndex = localPart.indexOf("[");
+ QName compXmlType = new QName(nsURI, localPart.substring(0, dimIndex));
+
+ TypeMappingImpl typeMapping = serContext.getTypeMapping();
+ Class javaType = typeMapping.getJavaType(compXmlType);
+ if (javaType == null)
+ throw new WSException("Cannot obtain javaType for: " + compXmlType);
+
+ return JavaUtils.getWrapperType(javaType);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-/**
- * A factory for a Deserializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2005
- */
-public class SOAPArrayDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer() throws BindingException
- {
- return new SOAPArrayDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Deserializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArrayDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer() throws BindingException
+ {
+ return new SOAPArrayDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,208 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.umdm.ParameterMetaData;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * A Serializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2005
- */
-public class SOAPArraySerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(SOAPArraySerializer.class);
-
- private SerializerSupport compSerializer;
- private NullValueSerializer nullSerializer;
- private boolean isArrayComponentType;
- private boolean xsiNamespaceInserted;
- private StringBuilder xmlFragment;
-
- public SOAPArraySerializer() throws BindingException
- {
- nullSerializer = new NullValueSerializer();
- }
-
- /**
- */
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + ",valueType=" + value.getClass().getName() + "]");
- try
- {
- ParameterMetaData paramMetaData =
(ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
- QName compXmlType = paramMetaData.getSOAPArrayCompType();
- QName compXmlName = paramMetaData.getXmlName();
- Class javaType = paramMetaData.getJavaType();
-
- Class compJavaType = javaType.getComponentType();
- isArrayComponentType = isArrayJavaType(compJavaType) &&
isArrayXmlType(compXmlType);
- while (compJavaType.getComponentType() != null && isArrayComponentType
== false)
- {
- compJavaType = compJavaType.getComponentType();
- isArrayComponentType = isArrayJavaType(compJavaType) &&
isArrayXmlType(compXmlType);
- }
-
- TypeMappingImpl typeMapping = serContext.getTypeMapping();
- if (compXmlType == null)
- {
- compXmlType = typeMapping.getXMLType(compJavaType);
- paramMetaData.setSOAPArrayCompType(compXmlType);
- }
-
- if (compXmlType == null)
- throw new WSException("Cannot obtain component xmlType for: " +
compJavaType);
-
- // Get the component type serializer factory
- log.debug("Get component serializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
- SerializerFactoryBase compSerializerFactory =
(SerializerFactoryBase)typeMapping.getSerializer(compJavaType, compXmlType);
- if (compSerializerFactory == null)
- {
- log.warn("Cannot obtain component serializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
- compSerializerFactory =
(SerializerFactoryBase)typeMapping.getSerializer(null, compXmlType);
- }
- if (compSerializerFactory == null)
- throw new WSException("Cannot obtain component serializer for: " +
compXmlType);
-
- // Get the component type serializer
- compSerializer = (SerializerSupport)compSerializerFactory.getSerializer();
-
- // Get the corresponding wrapper type
- if (JavaUtils.isPrimitive(value.getClass()))
- value = JavaUtils.getWrapperValueArray(value);
-
- xmlFragment = new StringBuilder("<" + Constants.PREFIX_SOAP11_ENC +
":Array ");
- if (value instanceof Object[])
- {
- Object[] objArr = (Object[])value;
- String arrayDim = "" + objArr.length;
-
- // Get multiple array dimension
- Object[] subArr = (Object[])value;
- while (isArrayComponentType == false && subArr.length > 0
&& subArr[0] instanceof Object[])
- {
- subArr = (Object[])subArr[0];
- arrayDim += "," + subArr.length;
- }
-
- compXmlType = serContext.getNamespaceRegistry().registerQName(compXmlType);
- String arrayType = Constants.PREFIX_SOAP11_ENC + ":arrayType='"
+ compXmlType.getPrefix() + ":" + compXmlType.getLocalPart() + "[" +
arrayDim + "]'";
- String compns = " xmlns:" + compXmlType.getPrefix() +
"='" + compXmlType.getNamespaceURI() + "'";
- xmlFragment.append(arrayType + compns + ">");
-
- serializeArrayComponents(compXmlName, compXmlType, serContext, objArr);
- }
- else
- {
- throw new WSException("Unsupported array type: " + javaType);
- }
- xmlFragment.append("</" + Constants.PREFIX_SOAP11_ENC +
":Array>");
-
- log.debug("serialized: " + xmlFragment);
- return xmlFragment.toString();
- }
- catch (RuntimeException e)
- {
- throw e;
- }
- catch (Exception e)
- {
- throw new BindingException(e);
- }
- }
-
- private void serializeArrayComponents(QName compXmlName, QName compXmlType,
SerializationContext serContext, Object[] objArr) throws BindingException
- {
- for (Object compValue : objArr)
- {
- if (isArrayComponentType == false && compValue instanceof Object[])
- {
- serializeArrayComponents(compXmlName, compXmlType, serContext,
(Object[])compValue);
- }
- else
- {
- SerializerSupport ser = compSerializer;
-
- // Null component value
- if (compValue == null)
- {
- ser = nullSerializer;
- if (xsiNamespaceInserted == false)
- {
- xsiNamespaceInserted = true;
- int insIndex = ("<" + Constants.PREFIX_SOAP11_ENC +
":Array ").length();
- xmlFragment.insert(insIndex, "xmlns:" + Constants.PREFIX_XSI
+ "='" + Constants.NS_SCHEMA_XSI + "' ");
- }
- }
-
- String compFragment = ser.serialize(compXmlName, compXmlType, compValue,
serContext, null);
- xmlFragment.append(compFragment);
- }
- }
- }
-
- /** True for all array xmlTypes, i.e. nmtokens, base64Binary, hexBinary
- *
- * FIXME: This method should be removed as soon as we can reliably get the SOAP
- * arrayType from wsdl + schema.
- */
- private boolean isArrayXmlType(QName xmlType)
- {
- boolean isArrayType = Constants.TYPE_SOAP11_BASE64.equals(xmlType);
- isArrayType = isArrayType || Constants.TYPE_SOAP11_BASE64.equals(xmlType);
- isArrayType = isArrayType || Constants.TYPE_SOAP11_BASE64BINARY.equals(xmlType);
- isArrayType = isArrayType || Constants.TYPE_SOAP11_HEXBINARY.equals(xmlType);
- isArrayType = isArrayType || Constants.TYPE_SOAP11_NMTOKENS.equals(xmlType);
- isArrayType = isArrayType || Constants.TYPE_LITERAL_BASE64BINARY.equals(xmlType);
- isArrayType = isArrayType || Constants.TYPE_LITERAL_HEXBINARY.equals(xmlType);
- isArrayType = isArrayType || Constants.TYPE_LITERAL_NMTOKENS.equals(xmlType);
- return isArrayType;
- }
-
- /** True for all array javaTypes, i.e. String[], Byte[], byte[]
- *
- * FIXME: This method should be removed as soon as we can reliably get the SOAP
- * arrayType from wsdl + schema.
- */
- private boolean isArrayJavaType(Class javaType)
- {
- boolean isBinaryType = String[].class.equals(javaType) ||
Byte[].class.equals(javaType) || byte[].class.equals(javaType);
- return isBinaryType;
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.umdm.ParameterMetaData;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A Serializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArraySerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(SOAPArraySerializer.class);
+
+ private SerializerSupport compSerializer;
+ private NullValueSerializer nullSerializer;
+ private boolean isArrayComponentType;
+ private boolean xsiNamespaceInserted;
+ private StringBuilder xmlFragment;
+
+ public SOAPArraySerializer() throws BindingException
+ {
+ nullSerializer = new NullValueSerializer();
+ }
+
+ /**
+ */
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + ",valueType=" + value.getClass().getName() + "]");
+ try
+ {
+ ParameterMetaData paramMetaData =
(ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
+ QName compXmlType = paramMetaData.getSOAPArrayCompType();
+ QName compXmlName = paramMetaData.getXmlName();
+ Class javaType = paramMetaData.getJavaType();
+
+ Class compJavaType = javaType.getComponentType();
+ isArrayComponentType = isArrayJavaType(compJavaType) &&
isArrayXmlType(compXmlType);
+ while (compJavaType.getComponentType() != null && isArrayComponentType
== false)
+ {
+ compJavaType = compJavaType.getComponentType();
+ isArrayComponentType = isArrayJavaType(compJavaType) &&
isArrayXmlType(compXmlType);
+ }
+
+ TypeMappingImpl typeMapping = serContext.getTypeMapping();
+ if (compXmlType == null)
+ {
+ compXmlType = typeMapping.getXMLType(compJavaType);
+ paramMetaData.setSOAPArrayCompType(compXmlType);
+ }
+
+ if (compXmlType == null)
+ throw new WSException("Cannot obtain component xmlType for: " +
compJavaType);
+
+ // Get the component type serializer factory
+ log.debug("Get component serializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+ SerializerFactoryBase compSerializerFactory =
(SerializerFactoryBase)typeMapping.getSerializer(compJavaType, compXmlType);
+ if (compSerializerFactory == null)
+ {
+ log.warn("Cannot obtain component serializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+ compSerializerFactory =
(SerializerFactoryBase)typeMapping.getSerializer(null, compXmlType);
+ }
+ if (compSerializerFactory == null)
+ throw new WSException("Cannot obtain component serializer for: " +
compXmlType);
+
+ // Get the component type serializer
+ compSerializer = (SerializerSupport)compSerializerFactory.getSerializer();
+
+ // Get the corresponding wrapper type
+ if (JavaUtils.isPrimitive(value.getClass()))
+ value = JavaUtils.getWrapperValueArray(value);
+
+ xmlFragment = new StringBuilder("<" + Constants.PREFIX_SOAP11_ENC +
":Array ");
+ if (value instanceof Object[])
+ {
+ Object[] objArr = (Object[])value;
+ String arrayDim = "" + objArr.length;
+
+ // Get multiple array dimension
+ Object[] subArr = (Object[])value;
+ while (isArrayComponentType == false && subArr.length > 0
&& subArr[0] instanceof Object[])
+ {
+ subArr = (Object[])subArr[0];
+ arrayDim += "," + subArr.length;
+ }
+
+ compXmlType = serContext.getNamespaceRegistry().registerQName(compXmlType);
+ String arrayType = Constants.PREFIX_SOAP11_ENC + ":arrayType='"
+ compXmlType.getPrefix() + ":" + compXmlType.getLocalPart() + "[" +
arrayDim + "]'";
+ String compns = " xmlns:" + compXmlType.getPrefix() +
"='" + compXmlType.getNamespaceURI() + "'";
+ xmlFragment.append(arrayType + compns + ">");
+
+ serializeArrayComponents(compXmlName, compXmlType, serContext, objArr);
+ }
+ else
+ {
+ throw new WSException("Unsupported array type: " + javaType);
+ }
+ xmlFragment.append("</" + Constants.PREFIX_SOAP11_ENC +
":Array>");
+
+ log.debug("serialized: " + xmlFragment);
+ return xmlFragment.toString();
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ private void serializeArrayComponents(QName compXmlName, QName compXmlType,
SerializationContext serContext, Object[] objArr) throws BindingException
+ {
+ for (Object compValue : objArr)
+ {
+ if (isArrayComponentType == false && compValue instanceof Object[])
+ {
+ serializeArrayComponents(compXmlName, compXmlType, serContext,
(Object[])compValue);
+ }
+ else
+ {
+ SerializerSupport ser = compSerializer;
+
+ // Null component value
+ if (compValue == null)
+ {
+ ser = nullSerializer;
+ if (xsiNamespaceInserted == false)
+ {
+ xsiNamespaceInserted = true;
+ int insIndex = ("<" + Constants.PREFIX_SOAP11_ENC +
":Array ").length();
+ xmlFragment.insert(insIndex, "xmlns:" + Constants.PREFIX_XSI
+ "='" + Constants.NS_SCHEMA_XSI + "' ");
+ }
+ }
+
+ String compFragment = ser.serialize(compXmlName, compXmlType, compValue,
serContext, null);
+ xmlFragment.append(compFragment);
+ }
+ }
+ }
+
+ /** True for all array xmlTypes, i.e. nmtokens, base64Binary, hexBinary
+ *
+ * FIXME: This method should be removed as soon as we can reliably get the SOAP
+ * arrayType from wsdl + schema.
+ */
+ private boolean isArrayXmlType(QName xmlType)
+ {
+ boolean isArrayType = Constants.TYPE_SOAP11_BASE64.equals(xmlType);
+ isArrayType = isArrayType || Constants.TYPE_SOAP11_BASE64.equals(xmlType);
+ isArrayType = isArrayType || Constants.TYPE_SOAP11_BASE64BINARY.equals(xmlType);
+ isArrayType = isArrayType || Constants.TYPE_SOAP11_HEXBINARY.equals(xmlType);
+ isArrayType = isArrayType || Constants.TYPE_SOAP11_NMTOKENS.equals(xmlType);
+ isArrayType = isArrayType || Constants.TYPE_LITERAL_BASE64BINARY.equals(xmlType);
+ isArrayType = isArrayType || Constants.TYPE_LITERAL_HEXBINARY.equals(xmlType);
+ isArrayType = isArrayType || Constants.TYPE_LITERAL_NMTOKENS.equals(xmlType);
+ return isArrayType;
+ }
+
+ /** True for all array javaTypes, i.e. String[], Byte[], byte[]
+ *
+ * FIXME: This method should be removed as soon as we can reliably get the SOAP
+ * arrayType from wsdl + schema.
+ */
+ private boolean isArrayJavaType(Class javaType)
+ {
+ boolean isBinaryType = String[].class.equals(javaType) ||
Byte[].class.equals(javaType) || byte[].class.equals(javaType);
+ return isBinaryType;
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,42 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Serializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2005
- */
-public class SOAPArraySerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer() throws BindingException
- {
- return new SOAPArraySerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArraySerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer() throws BindingException
+ {
+ return new SOAPArraySerializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,67 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.soap.SOAPElementImpl;
-import org.jboss.ws.core.soap.SOAPFactoryImpl;
-import org.w3c.dom.Element;
-
-/**
- * A deserializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jun-2005
- */
-public class SOAPElementDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(SOAPElementDeserializer.class);
-
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- try
- {
- Element domElement = DOMUtils.parse(xmlFragment);
- SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
- SOAPElementImpl soapElement = soapFactory.createElement(domElement, true);
- return soapElement;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new BindingException();
- }
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,67 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.soap.SOAPElementImpl;
+import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.w3c.dom.Element;
+
+/**
+ * A deserializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jun-2005
+ */
+public class SOAPElementDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(SOAPElementDeserializer.class);
+
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+ try
+ {
+ Element domElement = DOMUtils.parse(xmlFragment);
+ SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
+ SOAPElementImpl soapElement = soapFactory.createElement(domElement, true);
+ return soapElement;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new BindingException();
+ }
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SOAPElementDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new SOAPElementDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SOAPElementDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new SOAPElementDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,64 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * A serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SOAPElementSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(SOAPElementSerializer.class);
-
- /** Marshal the value for a given XMLSchema type
- * @param xmlType local part of the schema type
- * @param value the value to marshal
- * @param serContext
- * @return the string representation od the value
- */
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- if (value == null)
- throw new IllegalArgumentException("SOAPElement value cannot be
null");
- if ((value instanceof SOAPElement) == false)
- throw new IllegalArgumentException("Value is not a SOAPElement: " +
value.getClass().getName());
-
- String xmlFragment = DOMWriter.printNode((SOAPElement)value, false);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SOAPElementSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(SOAPElementSerializer.class);
+
+ /** Marshal the value for a given XMLSchema type
+ * @param xmlType local part of the schema type
+ * @param value the value to marshal
+ * @param serContext
+ * @return the string representation od the value
+ */
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+ if (value == null)
+ throw new IllegalArgumentException("SOAPElement value cannot be
null");
+ if ((value instanceof SOAPElement) == false)
+ throw new IllegalArgumentException("Value is not a SOAPElement: " +
value.getClass().getName());
+
+ String xmlFragment = DOMWriter.printNode((SOAPElement)value, false);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-/**
- * A factory for a Serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jun-2005
- */
-public class SOAPElementSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new SOAPElementSerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jun-2005
+ */
+public class SOAPElementSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new SOAPElementSerializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SerializerFactoryBase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,52 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Iterator;
-
-import javax.xml.rpc.encoding.Serializer;
-import javax.xml.rpc.encoding.SerializerFactory;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializerSupport;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class SerializerFactoryBase implements SerializerFactory
-{
- public abstract SerializerSupport getSerializer() throws BindingException;
-
- public Serializer getSerializerAs(String mechanismType)
- {
- throw new NotImplementedException();
- }
-
- public Iterator getSupportedMechanismTypes()
- {
- throw new NotImplementedException();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SerializerFactoryBase.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SerializerFactoryBase.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.xml.rpc.encoding.Serializer;
+import javax.xml.rpc.encoding.SerializerFactory;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializerSupport;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class SerializerFactoryBase implements SerializerFactory
+{
+ public abstract SerializerSupport getSerializer() throws BindingException;
+
+ public Serializer getSerializerAs(String mechanismType)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Iterator getSupportedMechanismTypes()
+ {
+ throw new NotImplementedException();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-import javax.xml.namespace.QName;
-
-/**
- * A deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 22-Oct-2004
- */
-public class SimpleDeserializer extends DeserializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(SimpleDeserializer.class);
-
- public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- Object value = null;
- String valueStr = unwrapValueStr(xmlFragment);
-
- if (valueStr != null)
- {
- value = SimpleTypeBindings.unmarshal(xmlType.getLocalPart(), valueStr,
serContext.getNamespaceRegistry());
- }
-
- return value;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+import javax.xml.namespace.QName;
+
+/**
+ * A deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 22-Oct-2004
+ */
+public class SimpleDeserializer extends DeserializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(SimpleDeserializer.class);
+
+ public Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
+ {
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ Object value = null;
+ String valueStr = unwrapValueStr(xmlFragment);
+
+ if (valueStr != null)
+ {
+ value = SimpleTypeBindings.unmarshal(xmlType.getLocalPart(), valueStr,
serContext.getNamespaceRegistry());
+ }
+
+ return value;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SimpleDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new SimpleDeserializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new SimpleDeserializer();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * A serializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SimpleSerializer extends SerializerSupport
-{
- // provide logging
- private static final Logger log = Logger.getLogger(SimpleSerializer.class);
-
- /** Marshal the value for a given XMLSchema type
- * @param xmlType local part of the schema type
- * @param value the value to marshal
- * @param serContext
- * @return the string representation od the value
- */
- public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
- {
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
-
- String valueStr;
- String typeName = xmlType.getLocalPart();
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
-
- if ("base64Binary".equals(typeName))
- {
- throw new NotImplementedException();
- }
- else
- {
- valueStr = SimpleTypeBindings.marshal(xmlType.getLocalPart(), value,
nsRegistry);
- }
-
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.common.jaxrpc.encoding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleSerializer extends SerializerSupport
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(SimpleSerializer.class);
+
+ /** Marshal the value for a given XMLSchema type
+ * @param xmlType local part of the schema type
+ * @param value the value to marshal
+ * @param serContext
+ * @return the string representation od the value
+ */
+ public String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+ {
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
+
+ String valueStr;
+ String typeName = xmlType.getLocalPart();
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+
+ if ("base64Binary".equals(typeName))
+ {
+ throw new NotImplementedException();
+ }
+ else
+ {
+ valueStr = SimpleTypeBindings.marshal(xmlType.getLocalPart(), value,
nsRegistry);
+ }
+
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializerFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.core.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Serializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SimpleSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new SimpleSerializer();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java
(from rev 1568,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializerFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.common.jaxrpc.encoding;
+
+import org.jboss.ws.common.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new SimpleSerializer();
+ }
+}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -41,16 +41,16 @@
import org.jboss.ws.common.WSException;
import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.jaxrpc.encoding.JBossXBDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.JBossXBSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SOAPArrayDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SOAPArraySerializerFactory;
import org.jboss.ws.common.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.core.CommonSOAPBinding;
import org.jboss.ws.core.jaxrpc.Use;
-import org.jboss.ws.core.jaxrpc.encoding.SOAPArrayDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SOAPArraySerializerFactory;
import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
-import org.jboss.ws.core.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.core.jbossxb.JBossXBSerializerFactory;
import org.jboss.ws.core.metadata.config.WSCommonConfig;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java 2006-12-06
05:06:23 UTC (rev 1568)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -27,8 +27,8 @@
import javax.xml.namespace.QName;
+import org.jboss.ws.common.binding.BindingException;
import org.jboss.ws.common.umdm.OperationMetaData;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.EndpointInvocation;
import org.jboss.ws.core.binding.UnboundHeader;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -29,9 +29,9 @@
import javax.xml.soap.SOAPMessage;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.xb.binding.NamespaceRegistry;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -48,6 +48,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
@@ -55,7 +56,6 @@
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.common.utils.MimeUtils;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.EndpointInvocation;
import org.jboss.ws.core.binding.UnboundHeader;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,92 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.binding;
-
-// $Id$
-
-/** An exception that may occur during message binding
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-Oct-2004
- */
-public class BindingException extends Exception
-{
- /**
- * Constructs a new exception with <code>null</code> as its detail
message.
- * The cause is not initialized, and may subsequently be initialized by a
- * call to {@link #initCause}.
- */
- public BindingException()
- {
- }
-
- /**
- * Constructs a new exception with the specified detail message. The
- * cause is not initialized, and may subsequently be initialized by
- * a call to {@link #initCause}.
- *
- * @param message the detail message. The detail message is saved for
- * later retrieval by the {@link #getMessage()} method.
- */
- public BindingException(String message)
- {
- super(message);
- }
-
- /**
- * Constructs a new exception with the specified cause and a detail
- * message of <tt>(cause==null ? null : cause.toString())</tt> (which
- * typically contains the class and detail message of <tt>cause</tt>).
- * This constructor is useful for exceptions that are little more than
- * wrappers for other throwables (for example, {@link
- * java.security.PrivilegedActionException}).
- *
- * @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- * @since 1.4
- */
- public BindingException(Throwable cause)
- {
- super(cause);
- }
-
- /**
- * Constructs a new exception with the specified detail message and
- * cause. <p>Note that the detail message associated with
- * <code>cause</code> is <i>not</i> automatically incorporated
in
- * this exception's detail message.
- *
- * @param message the detail message (which is saved for later retrieval
- * by the {@link #getMessage()} method).
- * @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- * @since 1.4
- */
- public BindingException(String message, Throwable cause)
- {
- super(message, cause);
- }
-}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.binding;
+import org.jboss.ws.common.binding.DeserializerSupport;
+
// $Id$
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.binding;
+import org.jboss.ws.common.binding.SerializerSupport;
+
// $Id$
/**
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.binding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.Deserializer;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.utils.XMLPredefinedEntityReferenceResolver;
-
-/** The base class for all Deserializers.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class DeserializerSupport implements Deserializer
-{
-
- /** Deserialize an XML fragment to an object value
- *
- * @param xmlName The root element name of the resulting fragment
- * @param xmlType The associated schema type
- * @param xmlFragment The XML fragment to deserialize
- * @param serContext The serialization context
- */
- public abstract Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException;
-
- /** Unwrap the value string from the XML fragment
- *
- * @return The value string or null if the startTag contains a xsi:nil='true'
attribute
- */
- protected String unwrapValueStr(String xmlFragment)
- {
- // We only scan for :nil if the xmlFragment is an empty element
- if (isEmptyElement(xmlFragment))
- {
- return (isNil(xmlFragment) ? null : "");
- }
-
- int endOfStartTag = xmlFragment.indexOf(">");
- int startOfEndTag = xmlFragment.lastIndexOf("</");
- if (endOfStartTag < 0 || startOfEndTag < 0)
- throw new IllegalArgumentException("Invalid XML fragment: " +
xmlFragment);
-
- String valueStr = xmlFragment.substring(endOfStartTag + 1, startOfEndTag);
-
- return XMLPredefinedEntityReferenceResolver.resolve(valueStr);
- }
-
- protected boolean isEmptyElement(String xmlFragment)
- {
- return xmlFragment.startsWith("<") &&
xmlFragment.endsWith("/>");
- }
-
- protected boolean isNil(String xmlFragment)
- {
- boolean isNil = false;
- if (isEmptyElement(xmlFragment))
- {
- int endOfStartTag = xmlFragment.indexOf(">");
- String startTag = xmlFragment.substring(0, endOfStartTag);
- isNil = startTag.indexOf(":nil='1'") > 0 ||
startTag.indexOf(":nil=\"1\"") > 0;
- isNil = isNil || startTag.indexOf(":nil='true'") > 0 ||
startTag.indexOf(":nil=\"true\"") > 0;
- }
- return isNil;
- }
-
- public String getMechanismType()
- {
- throw new NotImplementedException();
- }
-}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.binding;
-
-// $Id$
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.xb.binding.NamespaceRegistry;
-
-/**
- * An abstract serialization context
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class SerializationContext
-{
- // The type mapping that is valid for this serialization context
- private TypeMappingImpl typeMapping;
- // The namespace registry that is valid for this serialization context
- private NamespaceRegistry namespaceRegistry = new NamespaceRegistry();
- // An arbitrary property bag
- private Map<Object, Object> properties = new HashMap<Object, Object>();
-
- public Object getProperty(Object key)
- {
- return properties.get(key);
- }
-
- public void setProperty(Object key, Object value)
- {
- properties.put(key, value);
- }
-
- public TypeMappingImpl getTypeMapping()
- {
- return typeMapping;
- }
-
- public void setTypeMapping(TypeMappingImpl typeMapping)
- {
- this.typeMapping = typeMapping;
- }
-
- public NamespaceRegistry getNamespaceRegistry()
- {
- return namespaceRegistry;
- }
-}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,164 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.binding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.Serializer;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * The base class for all Serializers.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
- * @since 04-Dec-2004
- */
-public abstract class SerializerSupport implements Serializer
-{
- /** Serialize an object value to an XML fragment
- *
- * @param xmlName The root element name of the resulting fragment
- * @param xmlType The associated schema type
- * @param value The value to serialize
- * @param serContext The serialization context
- * @param attributes TODO
- * @param attributes The attributes on this element
- */
- public abstract String serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException;
-
- /** Wrap the value string in a XML fragment with the given name
- */
- protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry
nsRegistry, NamedNodeMap attributes, boolean normalize)
- {
- String nsURI = xmlName.getNamespaceURI();
- String localPart = xmlName.getLocalPart();
- String prefix = xmlName.getPrefix();
-
- StringBuilder nsAttr = new StringBuilder("");
- if (attributes != null)
- {
- for (int i = 0; i < attributes.getLength(); i++)
- {
- Node attr = attributes.item(i);
- String attrName = attr.getNodeName();
- String attrValue = attr.getNodeValue();
- nsAttr.append(" " + attrName + "='" + attrValue +
"'");
- }
- }
-
- String elName;
- if (nsURI.length() > 0)
- {
- xmlName = nsRegistry.registerQName(xmlName);
- prefix = xmlName.getPrefix();
- elName = prefix + ":" + localPart;
-
- String xmlns = " xmlns:" + prefix + "='" + nsURI +
"'";
- if (nsAttr.indexOf(xmlns) < 0)
- {
- nsAttr.append(xmlns);
- }
- }
- else
- {
- elName = localPart;
- }
-
- String xmlFragment;
- if (valueStr == null)
- {
- String xmlns = " xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'";
- xmlFragment = "<" + elName + nsAttr + " " +
Constants.PREFIX_XSI + ":nil='1'" + xmlns + "/>";
- }
- else
- {
- if(normalize)
- valueStr = normalize(valueStr);
- xmlFragment = "<" + elName + nsAttr + ">" + valueStr +
"</" + elName + ">";
- }
-
- return xmlFragment;
- }
-
- public String getMechanismType()
- {
- throw new NotImplementedException();
- }
-
- private String normalize(String valueStr)
- {
- // We assume most strings will not contain characters that need
"escaping",
- // and optimize for this case.
- boolean found = false;
- int i = 0;
-
- outer: for (; i < valueStr.length(); i++)
- {
- switch (valueStr.charAt(i))
- {
- case '<':
- case '>':
- case '&':
- case '"':
- found = true;
- break outer;
- }
- }
-
- if (!found)
- return valueStr;
-
- // Resume where we left off
- StringBuilder builder = new StringBuilder();
- builder.append(valueStr.substring(0, i));
- for (; i < valueStr.length(); i++)
- {
- char c = valueStr.charAt(i);
- switch (c)
- {
- case '<':
- builder.append("<");
- break;
- case '>':
- builder.append(">");
- break;
- case '&':
- builder.append("&");
- break;
- case '"':
- builder.append(""");
- break;
- default:
- builder.append(c);
- }
- }
-
- return builder.toString();
- }
-}
\ No newline at end of file
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -47,6 +47,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.jaxrpc.encoding.JBossXBDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.JBossXBSerializerFactory;
import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
@@ -59,8 +61,6 @@
import org.jboss.ws.core.binding.UnboundHeader;
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.core.jbossxb.JBossXBSerializerFactory;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extras.xop.XOPContext;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -35,22 +35,22 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.jaxrpc.encoding.Base64DeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.Base64SerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.ElementDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.ElementSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SOAPElementDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SOAPElementSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.Base64DeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.Base64SerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.CalendarDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.CalendarSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.DateDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.DateSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.ElementDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.ElementSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.HexDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.HexSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.QNameDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.QNameSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SOAPElementDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SOAPElementSerializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SimpleDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SimpleSerializerFactory;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -43,6 +43,8 @@
import org.jboss.ws.common.WSException;
import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.jaxrpc.encoding.JBossXBDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.JBossXBSerializerFactory;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
@@ -52,8 +54,6 @@
import org.jboss.ws.common.umdm.WrappedParameter;
import org.jboss.ws.common.utils.HolderUtils;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.core.jbossxb.JBossXBSerializerFactory;
/** A helper class to wrap/unwrap ducument style request/response structures.
*
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -45,17 +45,17 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
+import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.ws.common.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -29,6 +29,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
@@ -36,7 +37,6 @@
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.common.umdm.TypesMetaData;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -26,10 +26,10 @@
import javax.xml.rpc.handler.MessageContext;
import javax.xml.soap.SOAPMessage;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.xb.binding.NamespaceRegistry;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -33,10 +33,10 @@
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeDeserializer;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.extras.xop.jaxws.AttachmentUnmarshallerImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -21,9 +21,9 @@
*/
package org.jboss.ws.core.jaxws;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -32,10 +32,10 @@
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeSerializer;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.extras.xop.jaxws.AttachmentMarshallerImpl;
import org.w3c.dom.NamedNodeMap;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -21,9 +21,9 @@
*/
package org.jboss.ws.core.jaxws;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -24,7 +24,7 @@
// $Id$
import org.jboss.logging.Logger;
-import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializationContext;
/**
* The serialization context for JAXWS endpoints/clients
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -31,10 +31,10 @@
import javax.xml.ws.http.HTTPBinding;
import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.binding.BindingException;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.CommonBinding;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.EndpointInvocation;
import org.jboss.ws.core.binding.UnboundHeader;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -33,11 +33,11 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.CommonBinding;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.EndpointInvocation;
import org.jboss.ws.core.binding.UnboundHeader;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -35,11 +35,11 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.CommonBinding;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.EndpointInvocation;
import org.jboss.ws.core.binding.UnboundHeader;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -39,18 +39,18 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
+import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
+import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.ws.common.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -30,10 +30,10 @@
import javax.xml.ws.handler.MessageContext;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
import org.jboss.xb.binding.NamespaceRegistry;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -29,10 +29,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeDeserializer;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
/**
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,43 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jbossxb;
-
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-
-// $Id$
-
-/**
- * A factory for a Deserializer that can handle complex types
- * by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class JBossXBDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer() throws BindingException
- {
- return new JBossXBDeserializer();
- }
-}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -25,10 +25,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.SerializationContext;
import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeSerializer;
-import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.w3c.dom.NamedNodeMap;
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializerFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializerFactory.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializerFactory.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -1,44 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jbossxb;
-
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
-
-// $Id$
-
-
-/**
- * A factory for a Serializer that can handle complex types
- * by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class JBossXBSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer() throws BindingException
- {
- return new JBossXBSerializer();
- }
-}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -38,6 +38,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.binding.BindingException;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.ServerEndpointMetaData;
import org.jboss.ws.common.umdm.UnifiedMetaData;
@@ -45,7 +46,6 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPBinding;
-import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.SOAPElementImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -26,7 +26,14 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.binding.BindingException;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
+import org.jboss.ws.common.jaxrpc.encoding.NullValueSerializer;
+import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.utils.DOMUtils;
@@ -34,13 +41,6 @@
import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.common.utils.MimeUtils;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.encoding.NullValueSerializer;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.extras.xop.XOPContext;
import org.w3c.dom.*;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2006-12-06
05:06:23 UTC (rev 1568)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -46,11 +46,11 @@
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.encoding.SimpleDeserializerFactory;
+import org.jboss.ws.common.jaxrpc.encoding.SimpleSerializerFactory;
import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
/**
* Util class for the JBossWS Tools project
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2006-12-06
05:06:23 UTC (rev 1568)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2006-12-06
10:17:42 UTC (rev 1569)
@@ -32,14 +32,14 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.binding.DeserializerSupport;
+import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.common.binding.SerializerSupport;
import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.binding.DeserializerSupport;
-import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
+import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
import org.jboss.xb.binding.NamespaceRegistry;
/**