cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmen...@apache.org
Subject svn commit: r441230 [8/10] - in /incubator/cayenne/soc/trunk/cayenne-ropwsdl: cayenne-axis-dist/ cayenne-axis-server/ cayenne-axis-server/.externalToolBuilders/ cayenne-axis-server/.settings/ cayenne-axis-server/ant/ cayenne-axis-server/ant/lib/ cayenn...
Date Thu, 07 Sep 2006 21:28:15 GMT
Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQueryDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQueryDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQueryDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQueryDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,74 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.query.NamedQuery;
+import org.apache.cayenne.query.QueryMetadata;
+import org.apache.cayenne.remote.axis.ser.common.FieldAccessor;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class NamedQueryDeserializer extends
+		IndirectQueryDeserializer<NamedQuery> {
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Map<String, CallbackTarget> map = new HashMap<String, CallbackTarget>();
+		Callback callback = new Callback() {
+
+			@SuppressWarnings("unchecked")
+			public void setValue(Object value, Object hint) throws SAXException {
+				// TODO Remove private filed access
+				if (value != null)
+					FieldAccessor.getInstance().setFieldValue(NamedQuery.class,
+							"parameters", getValue(), new HashMap((Map) value));
+			}
+		};
+
+		map.put("parameters", new CallbackTarget(callback, null));
+
+		callback = new Callback() {
+
+			@SuppressWarnings("unchecked")
+			public void setValue(Object value, Object hint) throws SAXException {
+				getValue().initMetadata((QueryMetadata) value);
+			}
+		};
+
+		map.put("meta-data", new CallbackTarget(callback, null));
+
+		return map;
+	}
+
+	@Override
+	protected NamedQuery createValue(String namespace, Attributes attributes) {
+		return new NamedQuery(name, null);
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQuerySerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQuerySerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQuerySerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/NamedQuerySerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,98 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.query.IndirectQuery;
+import org.apache.cayenne.query.NamedQuery;
+import org.apache.cayenne.query.QueryMetadata;
+import org.apache.cayenne.remote.axis.peerdata.PeerDataUser;
+import org.apache.cayenne.remote.axis.peerdata.ServicePeerData;
+import org.apache.cayenne.remote.axis.ser.common.FieldAccessor;
+import org.w3c.dom.Element;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class NamedQuerySerializer extends IndirectQuerySerializer implements
+		PeerDataUser {
+
+	private ServicePeerData peerData;
+
+	public ServicePeerData getPeerData() {
+		return peerData;
+	}
+
+	public void setPeerData(ServicePeerData peerData) {
+		this.peerData = peerData;
+	}
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+		super.serializeChildren(name, value, context);
+		NamedQuery query = (NamedQuery) value;
+		QName typeQName = context.getQNameForClass(Hashtable.class);
+		QName qName = new QName(name.getNamespaceURI(), "parameters");
+
+		// TODO Remove private field access
+		Map parameters = (Map) FieldAccessor.getInstance().getFieldValue(
+				NamedQuery.class, "parameters", value);
+
+		context.serialize(qName, null, parameters, typeQName, Hashtable.class);
+
+		if (getPeerData().isServerSide()) {
+			typeQName = context.getQNameForClass(QueryMetadata.class);
+			qName = new QName(name.getNamespaceURI(), "meta-data");
+			QueryMetadata metadata = query.getMetaData(getPeerData()
+					.getContext().getEntityResolver());
+			context.serialize(qName, null, metadata, typeQName,
+					QueryMetadata.class);
+		}
+	}
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = types.createElement("complexType");
+		Element complexContent = types.createElement("complexContent");
+		Element extension = types.createElement("extension");
+		extension.setAttribute("base", types.writeType(IndirectQuery.class));
+		complexContent.appendChild(extension);
+		type.appendChild(complexContent);
+
+		Element seq = (Element) extension.appendChild(types
+				.createElement("sequence"));
+		seq.appendChild(types.createElement("parameters", types
+				.writeType(Hashtable.class), true, false, extension
+				.getOwnerDocument()));
+		seq.appendChild(types.createElement("meta-data", types
+				.writeType(QueryMetadata.class), true, false, extension
+				.getOwnerDocument()));
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQueryDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQueryDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQueryDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQueryDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,82 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.DeserializationContext;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.query.ObjectIdQuery;
+import org.apache.cayenne.remote.axis.ser.common.FieldAccessor;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class ObjectIdQueryDeserializer extends
+		IndirectQueryDeserializer<ObjectIdQuery> {
+	private int cachePolicy;
+
+	private boolean fetchingDataRows;
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Map<String, CallbackTarget> map = new HashMap<String, CallbackTarget>();
+		Callback callback = new Callback() {
+
+			@SuppressWarnings("unchecked")
+			public void setValue(Object value, Object hint) throws SAXException {
+				// TODO Remove private filed access
+				FieldAccessor.getInstance().setFieldValue(ObjectIdQuery.class,
+						"objectId", getValue(), value);
+			}
+		};
+
+		map.put("object-id", new CallbackTarget(callback, null));
+
+		return map;
+	}
+
+	@Override
+	protected ObjectIdQuery createValue(String namespace, Attributes attributes) {
+		ObjectIdQuery query = new ObjectIdQuery(new ObjectId(""),
+				fetchingDataRows, cachePolicy);
+		query.setName(name);
+		return query;
+	}
+
+	@Override
+	public void onStartElement(String namespace, String localName,
+			String prefix, Attributes attributes, DeserializationContext context)
+			throws SAXException {
+		cachePolicy = Integer.valueOf(attributes.getValue(namespace,
+				"cache-policy"));
+		fetchingDataRows = false;
+		if (attributes.getValue(namespace, "fetchingDataRows").equals("true"))
+			fetchingDataRows = true;
+		super.onStartElement(namespace, localName, prefix, attributes, context);
+
+	}
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQuerySerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQuerySerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQuerySerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/ObjectIdQuerySerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,101 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.query.IndirectQuery;
+import org.apache.cayenne.query.ObjectIdQuery;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class ObjectIdQuerySerializer extends IndirectQuerySerializer {
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		AttributesImpl attrs = (AttributesImpl) super.fillAttributes(name,
+				attributes, value, context);
+		ObjectIdQuery query = (ObjectIdQuery) value;
+		String nsUri = name.getNamespaceURI();
+
+		attrs.addAttribute(nsUri, "cache-policy", "", "xsd:integer", String
+				.valueOf(query.getCachePolicy()));
+		attrs.addAttribute(nsUri, "fetching-data-rows", "", "xsd:boolean",
+				context.getValueAsString(query.isFetchingDataRows(),
+						XMLType.XSD_BOOLEAN, boolean.class));
+
+		return attrs;
+	}
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+		super.serializeChildren(name, value, context);
+		ObjectIdQuery query = (ObjectIdQuery) value;
+
+		QName objectIdTypeQName = context.getTypeMapping().getTypeQName(
+				ObjectId.class);
+
+		QName objectIdQName = new QName(name.getNamespaceURI(), "object-id");
+
+		context.serialize(objectIdQName, null, query.getObjectId(),
+				objectIdTypeQName, ObjectId.class);
+	}
+
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+
+		Element type = types.createElement("complexType");
+		Element complexContent = types.createElement("complexContent");
+		Element extension = types.createElement("extension");
+		extension.setAttribute("base", types.writeType(IndirectQuery.class));
+		
+
+		Element seq = (Element) extension.appendChild(types
+				.createElement("sequence"));
+		
+		extension.appendChild(types.createAttributeElement(
+				"cache-policy", String.class, XMLType.XSD_INTEGER, false,
+				seq.getOwnerDocument()));
+		extension.appendChild(types.createAttributeElement("fetching-data-rows",
+				Boolean.class, XMLType.XSD_BOOLEAN, false, seq
+						.getOwnerDocument()));
+		String sObjectId = types.writeType(ObjectId.class);
+		
+		seq.appendChild(types.createElement("object-id", sObjectId, true, false,
+				type.getOwnerDocument()));
+		
+		
+		complexContent.appendChild(extension);
+		type.appendChild(complexContent);
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQueryDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQueryDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQueryDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQueryDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,55 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.query.QualifiedQuery;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QualifiedQueryDeserializer<T extends QualifiedQuery> extends
+		AbstractQueryDeserializer<T> {
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Map<String, CallbackTarget> map = new HashMap<String, CallbackTarget>();
+		Callback callback = new Callback() {
+
+			public void setValue(Object value, Object hint) throws SAXException {
+				getValue().setQualifier((Expression) value);
+
+			}
+
+		};
+
+		map.put("expression", new CallbackTarget(callback, null));
+
+		return map;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQuerySerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQuerySerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQuerySerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QualifiedQuerySerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,64 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.query.AbstractQuery;
+import org.apache.cayenne.query.QualifiedQuery;
+import org.w3c.dom.Element;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QualifiedQuerySerializer extends AbstractQuerySerializer {
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+		QName expTypeQName = context.getQNameForClass(Expression.class);
+		QName expQName = new QName(name.getNamespaceURI(), "qualifer");
+		context.serialize(expQName, null, ((QualifiedQuery) value)
+				.getQualifier(), expTypeQName, Expression.class);
+	}
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = types.createElement("complexType");
+		Element complexContent = types.createElement("complexContent");
+		Element extension = types.createElement("extension");
+		extension.setAttribute("base", types.writeType(AbstractQuery.class));
+		complexContent.appendChild(extension);
+		type.appendChild(complexContent);
+		
+		String sExpression = types.writeType(Expression.class);
+		Element seq = (Element) extension.appendChild(types
+				.createElement("sequence"));
+		seq.appendChild(types.createElement("expression", sExpression, true,
+				false, extension.getOwnerDocument()));		
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,75 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.query.Query;
+import org.apache.cayenne.query.QueryChain;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeDeserializer;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QueryChainDeserializer extends ComplexTypeDeserializer<QueryChain> {
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Map<String, CallbackTarget> map = new HashMap<String, CallbackTarget>();
+
+		Callback callback = new Callback() {
+
+			public void setValue(Object value, Object hint) throws SAXException {
+				Query[][] arr = (Query[][]) value;
+				for (int i = 0; i < arr.length; i++) {
+					getValue().addQuery((Query) arr[i][0]);
+				}
+			}
+
+		};
+
+		map.put("chain", new CallbackTarget(callback, null));
+
+		callback = new Callback() {
+
+			public void setValue(Object value, Object hint) throws SAXException {
+				getValue().setName((String) value);
+			}
+
+		};
+
+		map.put("name", new CallbackTarget(callback, null));
+
+		return map;
+
+	}
+
+	@Override
+	protected QueryChain createValue(String namespace, Attributes attributes) {
+		return new QueryChain();
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainSerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainSerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryChainSerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,97 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.query.Query;
+import org.apache.cayenne.query.QueryChain;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeSerializer;
+import org.apache.cayenne.remote.axis.ser.common.FieldAccessor;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QueryChainSerializer extends ComplexTypeSerializer {
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		QueryChain query = (QueryChain) value;
+		String nsUri = name.getNamespaceURI();
+
+		AttributesImpl attrs = new AttributesImpl();
+		if (attributes != null)
+			attrs.setAttributes(attributes);
+		attrs.addAttribute(nsUri, "name", "", "xsd:string", query.getName());
+
+		return attrs;
+	}
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+
+		QName typeQName = context.getQNameForClass(Query[].class);
+		QName qName = new QName(name.getNamespaceURI(), "chain");
+
+		// TODO Remove private field access
+		Collection chain = (Collection) FieldAccessor.getInstance().getFieldValue(
+				QueryChain.class, "chain", value);
+
+		context.serialize(qName, null, chain.toArray(), typeQName,
+				Query[].class);
+
+	}
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = types.createElement("complexType");
+		Element complexContent = types.createElement("complexContent");
+		Element extension = types.createElement("extension");
+		extension.setAttribute("base", types.writeType(Query.class));
+				
+		Element seq = (Element) extension.appendChild(types
+				.createElement("sequence"));
+		seq.appendChild(types.createElement("chain", types
+				.writeType(Object[].class), true, false, type
+				.getOwnerDocument()));
+
+		extension.appendChild(types.createAttributeElement("name",
+				String.class, XMLType.XSD_STRING, false, type
+						.getOwnerDocument()));
+
+		complexContent.appendChild(extension);
+		type.appendChild(complexContent);
+
+		
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,45 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.Map;
+
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.query.Query;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeDeserializer;
+import org.xml.sax.Attributes;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QueryDeserializer<T extends Query> extends
+		ComplexTypeDeserializer<T> {
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		return null;
+	}
+
+	@Override
+	protected T createValue(String namespace, Attributes attributes) {
+		return null;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,58 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.Map;
+
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.remote.axis.client.MutableQueryMetadata;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeDeserializer;
+import org.xml.sax.Attributes;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QueryMetadataDeserializer extends ComplexTypeDeserializer<MutableQueryMetadata> {
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		return null;
+	}
+
+	@Override
+	protected MutableQueryMetadata createValue(String namespace, Attributes attributes) {
+		MutableQueryMetadata metadata = new MutableQueryMetadata();
+		metadata.setCacheKey(attributes.getValue(namespace, "cache-key"));
+		metadata.setCachePolicy(attributes.getValue(namespace, "cache-policy"));
+		
+		metadata.setFetchLimit(Integer.valueOf(attributes.getValue(namespace, "fetch-limit")));
+		metadata.setFetchStartIndex(Integer.valueOf(attributes.getValue(namespace, "fetch-start-index")));
+		metadata.setPageSize(Integer.valueOf(attributes.getValue(namespace, "page-size")));
+		
+		metadata.setFetchingDataRows(Boolean.valueOf(attributes.getValue(namespace, "fetching-data-rows")));
+		metadata.setRefreshingObjects(Boolean.valueOf(attributes.getValue(namespace, "refreshing-objects")));
+		metadata.setResolvingInherited(Boolean.valueOf(attributes.getValue(namespace, "resolving-inherited")));
+		
+		return metadata;
+	}
+
+	 
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataSerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataSerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QueryMetadataSerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,106 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.query.QueryMetadata;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeSerializer;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QueryMetadataSerializer extends ComplexTypeSerializer {
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		AttributesImpl attrs = new AttributesImpl();
+		if (attributes != null)
+			attrs.setAttributes(attributes);
+		QueryMetadata metadata = (QueryMetadata) value;
+		String uri = name.getNamespaceURI();
+		attrs.addAttribute(uri, "cache-key", "", "xsd:string", metadata
+				.getCacheKey());
+		attrs.addAttribute(uri, "cache-policy", "", "xsd:string", metadata
+				.getCachePolicy());
+		attrs.addAttribute(uri, "fetch-limit", "", "xsd:integer", String
+				.valueOf(metadata.getFetchLimit()));
+		attrs.addAttribute(uri, "fetch-start-index", "", "xsd:integer", String
+				.valueOf(metadata.getFetchStartIndex()));
+		attrs.addAttribute(uri, "page-size", "", "xsd:integer", String
+				.valueOf(metadata.getPageSize()));
+		attrs.addAttribute(uri, "fetching-data-rows", "", "xsd:boolean", String
+				.valueOf(metadata.isFetchingDataRows()));
+		attrs.addAttribute(uri, "refreshing-objects", "", "xsd:boolean", String
+				.valueOf(metadata.isRefreshingObjects()));
+		attrs.addAttribute(uri, "resolving-inherited", "", "xsd:boolean",
+				String.valueOf(metadata.isResolvingInherited()));
+
+		return attrs;
+	}
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+	}
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = super.writeSchema(javaType, types);
+		type.appendChild(types.createAttributeElement("cache-key",
+				String.class, XMLType.XSD_STRING, false, type
+						.getOwnerDocument()));
+		type.appendChild(types.createAttributeElement("cache-policy",
+				String.class, XMLType.XSD_STRING, false, type
+						.getOwnerDocument()));
+		
+		type.appendChild(types.createAttributeElement("fetch-limit",
+				Integer.class, XMLType.XSD_INTEGER, false, type
+						.getOwnerDocument()));
+		type.appendChild(types.createAttributeElement("fetch-start-index",
+				Integer.class, XMLType.XSD_INTEGER, false, type
+						.getOwnerDocument()));
+		type.appendChild(types.createAttributeElement("page-size",
+				Integer.class, XMLType.XSD_INTEGER, false, type
+						.getOwnerDocument()));
+		
+		type.appendChild(types.createAttributeElement("fetching-data-rows",
+				Boolean.class, XMLType.XSD_BOOLEAN, false, type
+						.getOwnerDocument()));
+		type.appendChild(types.createAttributeElement("refreshing-objects",
+				Boolean.class, XMLType.XSD_BOOLEAN, false, type
+						.getOwnerDocument()));
+		type.appendChild(types.createAttributeElement("resolving-inherited",
+				Boolean.class, XMLType.XSD_BOOLEAN, false, type
+						.getOwnerDocument()));
+
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QuerySerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QuerySerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QuerySerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/QuerySerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,45 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeSerializer;
+import org.xml.sax.Attributes;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class QuerySerializer extends ComplexTypeSerializer {
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		return attributes;
+	}
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+	}	
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQueryDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQueryDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQueryDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQueryDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,81 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.DeserializationContext;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.query.RelationshipQuery;
+import org.apache.cayenne.remote.axis.ser.common.FieldAccessor;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class RelationshipQueryDeserializer extends
+		IndirectQueryDeserializer<RelationshipQuery> {
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Callback callback = new Callback() {
+
+			public void setValue(Object value, Object hint) throws SAXException {
+				// TODO Remove private field access
+				FieldAccessor.getInstance().setFieldValue(RelationshipQuery.class,
+						"objectId", getValue(), value);
+			}
+
+		};
+		return Collections.singletonMap("object-id", new CallbackTarget(
+				callback, null));
+
+	}
+
+	@Override
+	protected RelationshipQuery createValue(String namespace,
+			Attributes attributes) {
+		return new RelationshipQuery(new ObjectId(""), relationshipName,
+				refreshing);
+	}
+
+	protected String relationshipName;
+
+	protected boolean refreshing;
+
+	@Override
+	public void onStartElement(String namespace, String localName,
+			String prefix, Attributes attributes, DeserializationContext context)
+			throws SAXException {
+		relationshipName = attributes.getValue(namespace, "relationship-name");
+		refreshing = false;
+		if (attributes.getValue(namespace, "refreshing").equals("true"))
+			refreshing = true;
+
+		super.onStartElement(namespace, localName, prefix, attributes, context);
+
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQuerySerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQuerySerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQuerySerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/RelationshipQuerySerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,100 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.query.IndirectQuery;
+import org.apache.cayenne.query.RelationshipQuery;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class RelationshipQuerySerializer extends IndirectQuerySerializer {
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		AttributesImpl attrs = (AttributesImpl) super.fillAttributes(name,
+				attributes, value, context);
+		RelationshipQuery query = (RelationshipQuery) value;
+		String nsUri = name.getNamespaceURI();
+
+		attrs.addAttribute(nsUri, "relationship-name", "", "xsd:string", query
+				.getRelationshipName());
+		attrs.addAttribute(nsUri, "refreshing", "", "xsd:boolean", context
+				.getValueAsString(query.isRefreshing(), XMLType.XSD_BOOLEAN,
+						boolean.class));
+
+		return attrs;
+	}
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+		super.serializeChildren(name, value, context);
+		RelationshipQuery query = (RelationshipQuery) value;
+
+		QName objectIdTypeQName = context.getTypeMapping().getTypeQName(
+				ObjectId.class);
+
+		QName objectIdQName = new QName(name.getNamespaceURI(), "object-id");
+
+		context.serialize(objectIdQName, null, query.getObjectId(),
+				objectIdTypeQName, ObjectId.class);
+	}
+
+
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		
+		Element type = types.createElement("complexType");
+		Element complexContent = types.createElement("complexContent");
+		Element extension = types.createElement("extension");
+		extension.setAttribute("base", types.writeType(IndirectQuery.class));
+		
+		
+		Element seq = (Element) extension.appendChild(types
+				.createElement("sequence"));
+		extension.appendChild(types
+				.createAttributeElement("relationship-name", String.class,
+						XMLType.XSD_STRING, false, seq.getOwnerDocument()));
+		extension.appendChild(types.createAttributeElement("refreshing",
+				Boolean.class, XMLType.XSD_BOOLEAN, false, seq
+						.getOwnerDocument()));
+		String sObjectId = types.writeType(ObjectId.class);
+		seq.appendChild(types.createElement("object-id", sObjectId, true,
+				false, type.getOwnerDocument()));
+		
+		
+		complexContent.appendChild(extension);
+		type.appendChild(complexContent);
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQueryDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQueryDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQueryDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQueryDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,52 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import org.apache.axis.encoding.DeserializationContext;
+import org.apache.cayenne.query.SelectQuery;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class SelectQueryDeserializer extends
+		QualifiedQueryDeserializer<SelectQuery> {
+
+	@Override
+	protected SelectQuery createValue(String namespace, Attributes attributes) {
+		SelectQuery query = new SelectQuery();
+		query.setRoot(root);
+		query.setName(name);
+		query.setDistinct(distinct);
+		return query;
+	}
+
+	private boolean distinct;
+
+	@Override
+	public void onStartElement(String namespace, String localName,
+			String prefix, Attributes attributes, DeserializationContext context)
+			throws SAXException {
+		distinct = attributes.getValue(namespace, "distinct").equals("true");
+		super.onStartElement(namespace, localName, prefix, attributes, context);
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQuerySerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQuerySerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQuerySerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/SelectQuerySerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,72 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.query.QualifiedQuery;
+import org.apache.cayenne.query.SelectQuery;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class SelectQuerySerializer extends QualifiedQuerySerializer {
+
+	public SelectQuerySerializer() {
+	}
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		SelectQuery sel = (SelectQuery) value;
+		String nsUri = name.getNamespaceURI();
+		AttributesImpl attrs = new AttributesImpl(super.fillAttributes(name,
+				attributes, value, context));
+		attrs.addAttribute(nsUri, "distinct", "", "xsd:boolean", context
+				.getValueAsString(sel.isDistinct(), XMLType.XSD_BOOLEAN,
+						boolean.class));
+		return attrs;
+
+	}
+
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = types.createElement("complexType");
+		Element complexContent = types.createElement("complexContent");
+		Element extension = types.createElement("extension");
+		extension.setAttribute("base", types.writeType(QualifiedQuery.class));
+		complexContent.appendChild(extension);
+		extension.appendChild(types.createAttributeElement("distinct",
+				Boolean.class, XMLType.XSD_BOOLEAN, false, extension
+						.getOwnerDocument()));		
+		type.appendChild(complexContent);
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQueryDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQueryDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQueryDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQueryDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,68 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.query.UpdateQuery;
+import org.apache.cayenne.remote.axis.ser.common.FieldAccessor;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class UpdateQueryDeserializer extends
+		QualifiedQueryDeserializer<UpdateQuery> {
+
+	@SuppressWarnings("unchecked")
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Map<String, CallbackTarget> map = (Map<String, CallbackTarget>) super
+				.assignChildTargets();
+
+		Callback callback = new Callback() {
+
+			public void setValue(Object value, Object hint) throws SAXException {
+				// TODO Remove private field access
+				FieldAccessor.getInstance().setFieldValue(UpdateQuery.class,
+						"updAttributes", getValue(), value);
+
+			}
+
+		};
+
+		map.put("attributes", new CallbackTarget(callback, null));
+
+		return map;
+	}
+
+	@Override
+	protected UpdateQuery createValue(String namespace, Attributes attributes) {
+		UpdateQuery query = new UpdateQuery();
+		query.setRoot(root);
+		query.setName(name);
+		return query;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQuerySerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQuerySerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQuerySerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/query/UpdateQuerySerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,64 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.query;
+
+import java.io.IOException;
+import java.util.Hashtable;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.query.QualifiedQuery;
+import org.apache.cayenne.query.UpdateQuery;
+import org.w3c.dom.Element;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class UpdateQuerySerializer extends QualifiedQuerySerializer {
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+		QName attrTypeQName = context.getTypeMapping().getTypeQName(
+				Hashtable.class);
+		QName attrQName = new QName(name.getNamespaceURI(), "attributes");
+		context.serialize(attrQName, null, ((UpdateQuery) value)
+				.getUpdAttributes(), attrTypeQName, Hashtable.class);
+	}
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = types.createElement("complexType");
+		Element complexContent = types.createElement("complexContent");
+		Element extension = types.createElement("extension");
+		extension.setAttribute("base", types.writeType(QualifiedQuery.class));
+		Element seq = (Element) extension.appendChild(types
+				.createElement("sequence"));
+		seq.appendChild(types.createElement("attributes", types
+				.writeType(Hashtable.class), true, false, type
+				.getOwnerDocument()));
+		complexContent.appendChild(extension);
+		type.appendChild(complexContent);
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,93 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.resolving;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.map.DataMap;
+import org.apache.cayenne.map.ObjEntity;
+import org.apache.cayenne.query.Query;
+import org.apache.cayenne.remote.axis.peerdata.PeerDataUser;
+import org.apache.cayenne.remote.axis.peerdata.ServicePeerData;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeDeserializer;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class DataMapDeserializer extends ComplexTypeDeserializer<DataMap>
+		implements PeerDataUser {
+
+	private ServicePeerData peerData;
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Map<String, CallbackTarget> map = new HashMap<String, CallbackTarget>();
+
+		Callback callback = new Callback() {
+
+			@SuppressWarnings("unchecked")
+			public void setValue(Object value, Object hint) throws SAXException {
+				Map<String, Query> map = (Map<String, Query>) value;
+				DataMap dataMap = DataMapDeserializer.this.getValue();
+				for (Entry<String, Query> entry : map.entrySet()) {
+					dataMap.addQuery(entry.getValue());
+				}
+			}
+
+		};
+
+		map.put("query-map", new CallbackTarget(callback, null));
+
+		return map;
+	}
+
+	public ServicePeerData getPeerData() {
+		return peerData;
+	}
+
+	public void setPeerData(ServicePeerData peerData) {
+		this.peerData = peerData;
+	}
+
+	@Override
+	protected DataMap createValue(String namespace, Attributes attributes) {
+		DataMap map = new DataMap(attributes.getValue(namespace, "name"));
+		
+		//Merging object entities from local config.
+		DataMap localMap = getPeerData().getDataMap(map.getName());
+		if (localMap != null) {
+			for (Object object : localMap.getObjEntities()) {
+				ObjEntity entity = (ObjEntity) object;
+				map.addObjEntity(entity);
+			}
+			return map;
+		} else {
+			return null;
+		}
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapSerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapSerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/DataMapSerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,109 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.resolving;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.map.DataMap;
+import org.apache.cayenne.query.NamedQuery;
+import org.apache.cayenne.query.Query;
+import org.apache.cayenne.remote.axis.peerdata.PeerDataUser;
+import org.apache.cayenne.remote.axis.peerdata.ServicePeerData;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeSerializer;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class DataMapSerializer extends ComplexTypeSerializer implements
+		PeerDataUser {
+
+	private ServicePeerData peerData;
+
+	public ServicePeerData getPeerData() {
+		return peerData;
+	}
+
+	public void setPeerData(ServicePeerData peerData) {
+		this.peerData = peerData;
+	}
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		DataMap dataMap = (DataMap) value;
+		AttributesImpl attrs = new AttributesImpl();
+		if (attributes != null)
+			attrs.setAttributes(attributes);
+		attrs.addAttribute(name.getNamespaceURI(), "name", "", "xsd:string",
+				dataMap.getName());
+
+		return attrs;
+	}
+
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+		DataMap dataMap = (DataMap) value;
+		QName typeQName = context.getQNameForClass(HashMap.class);
+		QName qName = new QName(name.getNamespaceURI(), "query-map");
+
+		HashMap<String, NamedQuery> map = new HashMap<String, NamedQuery>();
+		// DataMap can be carried from server to client only.
+		for (Object obj : dataMap.getQueries()) {
+			Query query = (Query) obj;
+
+			NamedQuery proxy = new NamedQuery(query.getName());
+			proxy.setName(query.getName());
+
+			proxy.initMetadata(query.getMetaData(getPeerData().getContext()
+					.getEntityResolver()));
+
+			map.put(proxy.getName(), proxy);
+		}
+
+		context.serialize(qName, null, map, typeQName, HashMap.class);
+
+	}
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = types.createElement("complexType");
+		
+		Element seq = (Element) type.appendChild(types
+				.createElement("sequence"));
+		seq.appendChild(types
+				.createElement("query-map", types.writeType(HashMap.class),
+						true, false, type.getOwnerDocument()));
+		type.appendChild(types.createAttributeElement("name", String.class,
+				XMLType.XSD_STRING, false, type.getOwnerDocument()));
+
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,70 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.resolving;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.map.EntityResolver;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeDeserializer;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class EntityResolverDeserializer extends
+		ComplexTypeDeserializer<EntityResolver> {
+
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Callback callback = new Callback() {
+
+			@SuppressWarnings("unchecked")
+			public void setValue(Object value, Object hint) throws SAXException {
+				Object[] array = (Object[]) value;
+				ArrayList res = new ArrayList();
+				for (int i = 0; i < array.length; i++) {
+					Object object = array[i];
+					if ((object.getClass().isArray())
+							&& (((Object[]) object).length > 0))
+						res.add(((Object[]) object)[0]);
+					else
+						res.add(object);
+
+				}
+				EntityResolverDeserializer.this.getValue().setDataMaps(res);
+			}
+
+		};
+		return Collections.singletonMap("data-maps", new CallbackTarget(
+				callback, null));
+	}
+
+	@Override
+	protected EntityResolver createValue(String namespace, Attributes attributes) {
+		return new EntityResolver();
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverSerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverSerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/resolving/EntityResolverSerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,67 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.resolving;
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.wsdl.fromJava.Types;
+import org.apache.cayenne.map.DataMap;
+import org.apache.cayenne.map.EntityResolver;
+import org.apache.cayenne.remote.axis.ser.common.ComplexTypeSerializer;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class EntityResolverSerializer extends ComplexTypeSerializer {
+
+	@Override
+	protected Attributes fillAttributes(QName name, Attributes attributes,
+			Object value, SerializationContext context) throws IOException {
+		return attributes;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	protected void serializeChildren(QName name, Object value,
+			SerializationContext context) throws IOException {
+		EntityResolver resolver = (EntityResolver) value;
+		QName typeQName = context.getQNameForClass(DataMap[].class);
+		QName qName = new QName(name.getNamespaceURI(), "data-maps");
+		context.serialize(qName, null, resolver.getDataMaps().toArray(
+				new DataMap[0]), typeQName, DataMap[].class);
+	}
+
+	@Override
+	public Element writeSchema(Class javaType, Types types) throws Exception {
+		Element type = types.createElement("complexType");
+		Element seq = (Element) type.appendChild(types
+				.createElement("sequence"));
+		seq.appendChild(types.createElement("data-maps", types
+				.writeType(DataMap[].class), true, false, type
+				.getOwnerDocument()));
+		return type;
+	}
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,39 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.sync;
+
+import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.graph.ArcCreateOperation;
+import org.xml.sax.Attributes;
+
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class ArcCreateOperationDeserializer extends ArcOperationDeserializer<ArcCreateOperation> {
+	
+
+	@Override
+	protected ArcCreateOperation createValue(String namespace, Attributes attributes) {
+		return new ArcCreateOperation(new ObjectId(""), new ObjectId(""), "");
+	}
+
+	
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationSerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationSerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcCreateOperationSerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,27 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.sync;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class ArcCreateOperationSerializer extends ArcOperationSerializer {
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,37 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.sync;
+
+import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.graph.ArcDeleteOperation;
+import org.xml.sax.Attributes;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class ArcDeleteOperationDeserializer extends ArcOperationDeserializer<ArcDeleteOperation> {
+
+	@Override
+	protected ArcDeleteOperation createValue(String namespace, Attributes attributes) {
+		return new ArcDeleteOperation(new ObjectId(""), new ObjectId(""), "");
+	}
+
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationSerializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationSerializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcDeleteOperationSerializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,27 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.sync;
+
+/**
+ * AXIS serializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class ArcDeleteOperationSerializer extends ArcOperationSerializer {
+
+}

Added: incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcOperationDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcOperationDeserializer.java?view=auto&rev=441230
==============================================================================
--- incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcOperationDeserializer.java (added)
+++ incubator/cayenne/soc/trunk/cayenne-ropwsdl/cayenne-axis/src/org/apache/cayenne/remote/axis/ser/sync/ArcOperationDeserializer.java Thu Sep  7 14:28:04 2006
@@ -0,0 +1,71 @@
+/****************************************************************************
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License"); 
+ *  you may not use this file except in compliance with the License. 
+ *  You may obtain a copy of the License at 
+ *  
+ *  http://www.apache.org/licenses/LICENSE-2.0 
+ *  
+ *  Unless required by applicable law or agreed to in writing, software 
+ *  distributed under the License is distributed on an "AS IS" BASIS, 
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ *  See the License for the specific language governing permissions and 
+ *  limitations under the License.
+ ****************************************************************************/
+
+package org.apache.cayenne.remote.axis.ser.sync;
+
+import java.util.Map;
+
+import org.apache.axis.encoding.Callback;
+import org.apache.axis.encoding.CallbackTarget;
+import org.apache.axis.encoding.Target;
+import org.apache.cayenne.graph.NodeDiff;
+import org.apache.cayenne.remote.axis.ser.common.FieldAccessor;
+import org.xml.sax.SAXException;
+
+/**
+ * AXIS deserializer for Cayenne class.
+ * 
+ * @author Michael Victorov (m_victorov@mail.ru)
+ */
+@SuppressWarnings("serial")
+public class ArcOperationDeserializer<T extends NodeDiff> extends
+		NodeDiffDeserializer<T> {
+
+	@SuppressWarnings("unchecked")
+	@Override
+	protected Map<String, ? extends Target> assignChildTargets() {
+		Map<String, CallbackTarget> map = (Map<String, CallbackTarget>) super
+				.assignChildTargets();
+
+		Callback callback = new Callback() {
+
+			public void setValue(Object value, Object hint) throws SAXException {
+
+				FieldAccessor.getInstance().setFieldValue(
+						getValue().getClass(), "arcId", getValue(), value);
+
+			}
+
+		};
+
+		map.put("arc-id", new CallbackTarget(callback, null));
+
+		callback = new Callback() {
+
+			public void setValue(Object value, Object hint) throws SAXException {
+				FieldAccessor.getInstance().setFieldValue(
+						getValue().getClass(), "targetNodeId", getValue(),
+						value);
+			}
+
+		};
+
+		map.put("target-node-id", new CallbackTarget(callback, null));
+
+		return map;
+	}
+
+}



Mime
View raw message