You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bi...@apache.org on 2009/03/12 03:13:41 UTC
svn commit: r752749 - in
/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom:
service/ types/
Author: bimargulies
Date: Thu Mar 12 02:13:40 2009
New Revision: 752749
URL: http://svn.apache.org/viewvc?rev=752749&view=rev
Log:
Try again to add these.
Added:
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBean.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanImpl.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKey.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKeyImpl.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/Service.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceImpl.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyType.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyTypeRegistrar.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanType.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanTypeRegistrar.java (with props)
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBean.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBean.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBean.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.service;
+
+public interface NoDefaultConstructorBean {
+ String getId();
+ String getName();
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBean.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanImpl.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanImpl.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanImpl.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.service;
+
+public class NoDefaultConstructorBeanImpl implements NoDefaultConstructorBean {
+
+ private String id;
+
+ private String name;
+
+ public NoDefaultConstructorBeanImpl(String id, String name) {
+ super();
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKey.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKey.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKey.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKey.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.service;
+
+public interface NoDefaultConstructorBeanKey {
+
+ String getKey();
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKey.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKey.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKeyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKeyImpl.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKeyImpl.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKeyImpl.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.service;
+
+public class NoDefaultConstructorBeanKeyImpl implements NoDefaultConstructorBeanKey {
+
+ private String key;
+
+ public NoDefaultConstructorBeanKeyImpl(String key) {
+ super();
+ this.key = key;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (key == null ? 0 : key.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ NoDefaultConstructorBeanKeyImpl other = (NoDefaultConstructorBeanKeyImpl)obj;
+ if (key == null) {
+ if (other.key != null) {
+ return false;
+ }
+ } else if (!key.equals(other.key)) {
+ return false;
+ }
+ return true;
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKeyImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/NoDefaultConstructorBeanKeyImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/Service.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/Service.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/Service.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/Service.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.service;
+
+import java.util.Collection;
+import java.util.Map;
+
+import javax.jws.WebService;
+
+@WebService
+public interface Service {
+
+ Collection<NoDefaultConstructorBean> getByName(NoDefaultConstructorBeanKey key);
+
+ Map<NoDefaultConstructorBeanKey, Collection<NoDefaultConstructorBean>>
+ getByNames(Collection<NoDefaultConstructorBeanKey> keys);
+
+ Map<String, NoDefaultConstructorBean> getByIds(Collection<String> beanIds);
+
+ String getException(NoDefaultConstructorBeanKey key) throws ServiceException;
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/Service.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/Service.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.service;
+
+public class ServiceException extends Exception {
+
+ private static final long serialVersionUID = 5872308284631632512L;
+
+ public ServiceException() {
+ super("");
+ }
+
+ public ServiceException(String msg) {
+ super(msg);
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceImpl.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceImpl.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceImpl.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.service;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ServiceImpl implements Service {
+
+ public Map<String, NoDefaultConstructorBean> getByIds(Collection<String> beanIds) {
+ if (beanIds == null) {
+ throw new IllegalArgumentException("beanIds is null");
+ }
+
+ Map<String, NoDefaultConstructorBean> map = new HashMap<String, NoDefaultConstructorBean>();
+
+ map.put("1", new NoDefaultConstructorBeanImpl("1", "name"));
+ map.put("2", new NoDefaultConstructorBeanImpl("2", "name"));
+
+ return map;
+ }
+
+ public Collection<NoDefaultConstructorBean> getByName(NoDefaultConstructorBeanKey key) {
+ if (key == null) {
+ throw new IllegalArgumentException("key is null");
+ }
+
+ Collection<NoDefaultConstructorBean> collection = new ArrayList<NoDefaultConstructorBean>();
+
+ collection.add(new NoDefaultConstructorBeanImpl("1", "name"));
+
+ return collection;
+ }
+
+ public Map<NoDefaultConstructorBeanKey, Collection<NoDefaultConstructorBean>>
+ getByNames(Collection<NoDefaultConstructorBeanKey> keys) {
+ if (keys == null) {
+ throw new IllegalArgumentException("keys is null");
+ }
+
+ Map<NoDefaultConstructorBeanKey, Collection<NoDefaultConstructorBean>> map =
+ new HashMap<NoDefaultConstructorBeanKey, Collection<NoDefaultConstructorBean>>();
+
+ Collection<NoDefaultConstructorBean> collection = new ArrayList<NoDefaultConstructorBean>();
+
+ collection.add(new NoDefaultConstructorBeanImpl("1", "name"));
+
+ map.put(new NoDefaultConstructorBeanKeyImpl("name"), collection);
+
+ return map;
+ }
+
+ public String getException(NoDefaultConstructorBeanKey key) throws ServiceException {
+ if (key == null) {
+ throw new IllegalArgumentException("key is null");
+ }
+
+ throw new ServiceException("Key: " + key.getKey());
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyType.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyType.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyType.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,89 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.types;
+
+import java.util.Collections;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.aegis.Context;
+import org.apache.cxf.aegis.DatabindingException;
+import org.apache.cxf.aegis.custom.service.NoDefaultConstructorBeanKey;
+import org.apache.cxf.aegis.custom.service.NoDefaultConstructorBeanKeyImpl;
+import org.apache.cxf.aegis.type.Type;
+import org.apache.cxf.aegis.type.TypeUtil;
+import org.apache.cxf.aegis.type.basic.BeanType;
+import org.apache.cxf.aegis.type.basic.BeanTypeInfo;
+import org.apache.cxf.aegis.type.java5.Java5TypeCreator;
+import org.apache.cxf.aegis.xml.MessageReader;
+
+public class NoDefaultConstructorBeanKeyType extends BeanType {
+
+ public static final Class<?> TYPE_CLASS = NoDefaultConstructorBeanKey.class;
+
+ public static final QName QNAME = new Java5TypeCreator().createQName(TYPE_CLASS);
+
+ public NoDefaultConstructorBeanKeyType() {
+ super();
+ setTypeClass(TYPE_CLASS);
+ setSchemaType(QNAME);
+ }
+
+ @Override
+ public Object readObject(MessageReader reader, Context context) throws DatabindingException {
+ BeanTypeInfo inf = getTypeInfo();
+
+ try {
+ String key = null;
+
+ // Read child elements
+ while (reader.hasMoreElementReaders()) {
+ MessageReader childReader = reader.getNextElementReader();
+ if (childReader.isXsiNil()) {
+ childReader.readToEnd();
+ continue;
+ }
+ QName name = childReader.getName();
+ Type defaultType = inf.getType(name);
+ Type type = TypeUtil.getReadType(childReader.getXMLStreamReader(),
+ context.getGlobalContext(), defaultType);
+ if (type != null) {
+ String value = (String)type.readObject(childReader, context);
+ if ("key".equals(name.getLocalPart())) {
+ key = value;
+ }
+ } else {
+ childReader.readToEnd();
+ }
+ }
+
+ return new NoDefaultConstructorBeanKeyImpl(key);
+ } catch (IllegalArgumentException e) {
+ throw new DatabindingException("Illegal argument. " + e.getMessage(), e);
+ }
+ }
+
+ @Override
+ public Set<Type> getDependencies() {
+ // The string type is provided by aegis, so it should always be there.
+ Type stringType = getTypeMapping().getType(String.class);
+ return Collections.singleton(stringType);
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyType.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyTypeRegistrar.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyTypeRegistrar.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyTypeRegistrar.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyTypeRegistrar.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.types;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+
+public class NoDefaultConstructorBeanKeyTypeRegistrar {
+ private AegisDatabinding dataBinding;
+
+ public void register() {
+ dataBinding.getAegisContext().getTypeMapping().register(NoDefaultConstructorBeanKeyType.TYPE_CLASS,
+ NoDefaultConstructorBeanKeyType.QNAME,
+ new NoDefaultConstructorBeanType());
+ }
+
+ public void setDataBinding(AegisDatabinding dataBinding) {
+ this.dataBinding = dataBinding;
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyTypeRegistrar.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanKeyTypeRegistrar.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanType.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanType.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanType.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,91 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.types;
+
+import java.util.Collections;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.aegis.Context;
+import org.apache.cxf.aegis.DatabindingException;
+import org.apache.cxf.aegis.custom.service.NoDefaultConstructorBean;
+import org.apache.cxf.aegis.custom.service.NoDefaultConstructorBeanImpl;
+import org.apache.cxf.aegis.type.Type;
+import org.apache.cxf.aegis.type.TypeUtil;
+import org.apache.cxf.aegis.type.basic.BeanType;
+import org.apache.cxf.aegis.type.basic.BeanTypeInfo;
+import org.apache.cxf.aegis.type.java5.Java5TypeCreator;
+import org.apache.cxf.aegis.xml.MessageReader;
+
+public class NoDefaultConstructorBeanType extends BeanType {
+
+ public static final Class<?> TYPE_CLASS = NoDefaultConstructorBean.class;
+
+ public static final QName QNAME = new Java5TypeCreator().createQName(TYPE_CLASS);
+
+ public NoDefaultConstructorBeanType() {
+ super();
+ setTypeClass(TYPE_CLASS);
+ setSchemaType(QNAME);
+ }
+
+ @Override
+ public Object readObject(MessageReader reader, Context context) throws DatabindingException {
+ BeanTypeInfo inf = getTypeInfo();
+
+ try {
+ String id = null;
+ String name = null;
+
+ // Read child elements
+ while (reader.hasMoreElementReaders()) {
+ MessageReader childReader = reader.getNextElementReader();
+ if (childReader.isXsiNil()) {
+ childReader.readToEnd();
+ continue;
+ }
+ QName qName = childReader.getName();
+ Type defaultType = inf.getType(qName);
+ Type type = TypeUtil.getReadType(childReader.getXMLStreamReader(),
+ context.getGlobalContext(), defaultType);
+ if (type != null) {
+ String value = (String)type.readObject(childReader, context);
+ if ("id".equals(qName.getLocalPart())) {
+ id = value;
+ } else if ("name".equals(qName.getLocalPart())) {
+ name = value;
+ }
+ } else {
+ childReader.readToEnd();
+ }
+ }
+
+ return new NoDefaultConstructorBeanImpl(id, name);
+ } catch (IllegalArgumentException e) {
+ throw new DatabindingException("Illegal argument. " + e.getMessage(), e);
+ }
+ }
+
+ @Override
+ public Set<Type> getDependencies() {
+ Type stringType = getTypeMapping().getType(String.class);
+ return Collections.singleton(stringType);
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanType.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanTypeRegistrar.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanTypeRegistrar.java?rev=752749&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanTypeRegistrar.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanTypeRegistrar.java Thu Mar 12 02:13:40 2009
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.aegis.custom.types;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+
+public class NoDefaultConstructorBeanTypeRegistrar {
+ private AegisDatabinding dataBinding;
+
+ public void register() {
+ dataBinding.getAegisContext().getTypeMapping().register(NoDefaultConstructorBeanType.TYPE_CLASS,
+ NoDefaultConstructorBeanType.QNAME,
+ new NoDefaultConstructorBeanType());
+ }
+
+ public void setDataBinding(AegisDatabinding dataBinding) {
+ this.dataBinding = dataBinding;
+ }
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanTypeRegistrar.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/types/NoDefaultConstructorBeanTypeRegistrar.java
------------------------------------------------------------------------------
svn:keywords = Rev Date