You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/12/23 13:54:58 UTC
[1/2] cxf git commit: [CXF-7196] Removing rt-databindings-sdo
Repository: cxf
Updated Branches:
refs/heads/master fb11380da -> 969a10c9f
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource.java
deleted file mode 100644
index e93c13b..0000000
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * 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.systest.jaxrs.sdo;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.apache.cxf.systest.jaxrs.sdo.impl.StructureImpl;
-
-
-@Path("/structures")
-public class SDOResource {
-
- @SuppressWarnings("unchecked")
- @GET
- @Path("/structure")
- @Produces({"application/xml", "application/json" })
- public Structure getStructure() {
- Structure struct = new StructureImpl();
- struct.getTexts().add("text1");
- struct.setText("sdo");
- struct.setInt(3);
- struct.setDbl(123.5);
- return struct;
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource2.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource2.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource2.java
deleted file mode 100644
index 5649648..0000000
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SDOResource2.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.systest.jaxrs.sdo;
-
-import org.apache.cxf.annotations.DataBinding;
-
-@DataBinding(org.apache.cxf.sdo.SDODataBinding.class)
-public class SDOResource2 extends SDOResource {
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SdoFactory.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SdoFactory.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SdoFactory.java
deleted file mode 100644
index e85b693..0000000
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/SdoFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.systest.jaxrs.sdo;
-
-import commonj.sdo.helper.HelperContext;
-
-public interface SdoFactory {
-
- SdoFactory INSTANCE = org.apache.cxf.systest.jaxrs.sdo.impl.SdoFactoryImpl.init();
- Structure createStructure();
-
- void register(HelperContext scope);
-}
-
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/Structure.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/Structure.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/Structure.java
deleted file mode 100644
index cde68b9..0000000
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/Structure.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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.
- */
-/**
- * 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.systest.jaxrs.sdo;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-public interface Structure extends Serializable {
- String getText();
- void setText(String value);
- void unsetText();
- boolean isSetText();
- int getInt();
- void setInt(int value);
- void unsetInt();
- boolean isSetInt();
- double getDbl();
- void setDbl(double value);
- void unsetDbl();
- boolean isSetDbl();
- @SuppressWarnings("rawtypes")
- List getTexts();
-}
-
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/SdoFactoryImpl.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/SdoFactoryImpl.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/SdoFactoryImpl.java
deleted file mode 100644
index 83dab96..0000000
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/SdoFactoryImpl.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- * 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.systest.jaxrs.sdo.impl;
-
-import org.apache.cxf.systest.jaxrs.sdo.SdoFactory;
-import org.apache.cxf.systest.jaxrs.sdo.Structure;
-import org.apache.tuscany.sdo.helper.HelperContextImpl;
-import org.apache.tuscany.sdo.impl.FactoryBase;
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-
-//CHECKSTYLE:OFF
-public class SdoFactoryImpl extends FactoryBase implements SdoFactory {
- public static final String NAMESPACE_URI = "http://apache.org/structure/types";
- public static final String NAMESPACE_PREFIX = "tns";
- public static final String PATTERN_VERSION = "1.2";
- public static final int STRUCTURE = 1;
- private static SdoFactoryImpl instance = null;
- protected Type structureType = null;
- private boolean isCreated = false;
- private boolean isInitialized = false;
-
- public SdoFactoryImpl() {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "org.apache.cxf.systest.jaxrs.sdo");
- }
-
- public void register(HelperContext scope) {
- if(scope == null) {
- throw new IllegalArgumentException("Scope can not be null");
- }
-
- if (((HelperContextImpl)scope).getExtendedMetaData().getPackage(NAMESPACE_URI) != null) {
- return;
- }
- // Register this package with provided scope
- ((HelperContextImpl)scope).getExtendedMetaData().putPackage(NAMESPACE_URI, this);
-
- //Register dependent packages with provided scope
- ModelFactory.INSTANCE.register(scope);
- }
-
- public DataObject create(int typeNumber) {
- switch (typeNumber) {
- case STRUCTURE :
- return (DataObject)createStructure();
- default :
- return super.create(typeNumber);
- }
- }
-
- public Structure createStructure() {
- return new StructureImpl();
- }
-
- public Type getStructure() {
- return structureType;
- }
-
- public static SdoFactoryImpl init() {
- if (instance != null) {
- return instance;
- }
- instance = new SdoFactoryImpl();
-
- instance.createMetaData();
- instance.initializeMetaData();
- return instance;
- }
-
- public void createMetaData() {
- if (isCreated) {
- return;
- }
- isCreated = true;
-
- structureType = createType(false, STRUCTURE);
- createProperty(true, structureType,StructureImpl._INTERNAL_TEXT);
- createProperty(true, structureType,StructureImpl._INTERNAL_INT);
- createProperty(true, structureType,StructureImpl._INTERNAL_DBL);
- createProperty(true, structureType,StructureImpl._INTERNAL_TEXTS);
- }
-
- public void initializeMetaData() {
- if (isInitialized) {
- return;
- }
- isInitialized = true;
-
- ModelFactoryImpl theModelPackageImpl = ModelFactoryImpl.init();
- Property property = null;
-
- // Add supertypes to types
-
-
- initializeType(structureType, Structure.class, "Structure", false);
- property = getLocalProperty(structureType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "text", null, 1, 1,
- Structure.class, false, true, false);
-
- property = getLocalProperty(structureType, 1);
- initializeProperty(property, theModelPackageImpl.getInt(), "int", null, 1, 1,
- Structure.class, false, true, false);
-
- property = getLocalProperty(structureType, 2);
- initializeProperty(property, theModelPackageImpl.getDouble(), "dbl", null, 1, 1,
- Structure.class, false, true, false);
-
- property = getLocalProperty(structureType, 3);
- initializeProperty(property, theModelPackageImpl.getString(), "texts", null, 1, -1,
- Structure.class, false, false, false);
-
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- addXSDMapping
- (structureType,
- new String[] {
- "name", "Structure",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getLocalProperty(structureType, 0),
- new String[] {
- "kind", "element",
- "name", "text",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (getLocalProperty(structureType, 1),
- new String[] {
- "kind", "element",
- "name", "int",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (getLocalProperty(structureType, 2),
- new String[] {
- "kind", "element",
- "name", "dbl",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (getLocalProperty(structureType, 3),
- new String[] {
- "kind", "element",
- "name", "texts",
- "namespace", "##targetNamespace"
- });
- }
-
-
-
-} //SdoFactoryImpl
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/StructureImpl.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/StructureImpl.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/StructureImpl.java
deleted file mode 100644
index 23454df..0000000
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/impl/StructureImpl.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/**
- * 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.systest.jaxrs.sdo.impl;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.cxf.systest.jaxrs.sdo.SdoFactory;
-import org.apache.cxf.systest.jaxrs.sdo.Structure;
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-import commonj.sdo.Type;
-
-//CHECKSTYLE:OFF
-public class StructureImpl extends DataObjectBase implements Structure {
-
- public static final int TEXT = 0;
-
- public static final int INT = 1;
-
- public static final int DBL = 2;
-
- public static final int TEXTS = 3;
-
- public static final int SDO_PROPERTY_COUNT = 4;
-
- public static final int EXTENDED_PROPERTY_COUNT = 0;
-
- /**
- * The internal feature id for the '<em><b>Text</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- public static final int _INTERNAL_TEXT = 0;
-
- /**
- * The internal feature id for the '<em><b>Int</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- public static final int _INTERNAL_INT = 1;
-
- /**
- * The internal feature id for the '<em><b>Dbl</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- public static final int _INTERNAL_DBL = 2;
-
- /**
- * The internal feature id for the '<em><b>Texts</b></em>' attribute list.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- public static final int _INTERNAL_TEXTS = 3;
-
- /**
- * The number of properties for this type. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- public static final int INTERNAL_PROPERTY_COUNT = 4;
-
- /**
- * The default value of the '{@link #getText() <em>Text</em>}' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getText()
- * @generated
- * @ordered
- */
- protected static final String TEXT_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getText() <em>Text</em>}' attribute.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getText()
- * @generated
- * @ordered
- */
- protected String text = TEXT_DEFAULT_;
-
- /**
- * This is true if the Text attribute has been set. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- protected boolean text_set_ = false;
-
- /**
- * The default value of the '{@link #getInt() <em>Int</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getInt()
- * @generated
- * @ordered
- */
- protected static final int INT_DEFAULT_ = 0;
-
- /**
- * The cached value of the '{@link #getInt() <em>Int</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getInt()
- * @generated
- * @ordered
- */
- protected int int_ = INT_DEFAULT_;
-
- /**
- * This is true if the Int attribute has been set. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- protected boolean int_set_ = false;
-
- /**
- * The default value of the '{@link #getDbl() <em>Dbl</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getDbl()
- * @generated
- * @ordered
- */
- protected static final double DBL_DEFAULT_ = 0.0;
-
- /**
- * The cached value of the '{@link #getDbl() <em>Dbl</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getDbl()
- * @generated
- * @ordered
- */
- protected double dbl = DBL_DEFAULT_;
-
- /**
- * This is true if the Dbl attribute has been set. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- protected boolean dbl_set_ = false;
-
- /**
- * The cached value of the '{@link #getTexts() <em>Texts</em>}' attribute
- * list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getTexts()
- * @generated
- * @ordered
- */
-
- protected List<?> texts = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public StructureImpl() {
- super();
- }
-
- protected int internalConvertIndex(int internalIndex) {
- switch (internalIndex) {
- case _INTERNAL_TEXT:
- return TEXT;
- case _INTERNAL_INT:
- return INT;
- case _INTERNAL_DBL:
- return DBL;
- case _INTERNAL_TEXTS:
- return TEXTS;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Type getStaticType() {
- return ((SdoFactoryImpl)SdoFactory.INSTANCE).getStructure();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public int getStaticPropertyCount() {
- return INTERNAL_PROPERTY_COUNT;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getText() {
- return text;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setText(String newText) {
- String oldText = text;
- text = newText;
- boolean oldText_set_ = text_set_;
- text_set_ = true;
- if (isNotifying()) {
- notify(ChangeKind.SET, _INTERNAL_TEXT, oldText, text, !oldText_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void unsetText() {
- String oldText = text;
- boolean oldText_set_ = text_set_;
- text = TEXT_DEFAULT_;
- text_set_ = false;
- if (isNotifying()) {
- notify(ChangeKind.UNSET, _INTERNAL_TEXT, oldText, TEXT_DEFAULT_, oldText_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isSetText() {
- return text_set_;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public int getInt() {
- return int_;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setInt(int newInt) {
- int oldInt = int_;
- int_ = newInt;
- boolean oldInt_set_ = int_set_;
- int_set_ = true;
- if (isNotifying()) {
- notify(ChangeKind.SET, _INTERNAL_INT, oldInt, int_, !oldInt_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void unsetInt() {
- int oldInt = int_;
- boolean oldInt_set_ = int_set_;
- int_ = INT_DEFAULT_;
- int_set_ = false;
- if (isNotifying()) {
- notify(ChangeKind.UNSET, _INTERNAL_INT, oldInt, INT_DEFAULT_, oldInt_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isSetInt() {
- return int_set_;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public double getDbl() {
- return dbl;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setDbl(double newDbl) {
- double oldDbl = dbl;
- dbl = newDbl;
- boolean oldDbl_set_ = dbl_set_;
- dbl_set_ = true;
- if (isNotifying()) {
- notify(ChangeKind.SET, _INTERNAL_DBL, oldDbl, dbl, !oldDbl_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void unsetDbl() {
- double oldDbl = dbl;
- boolean oldDbl_set_ = dbl_set_;
- dbl = DBL_DEFAULT_;
- dbl_set_ = false;
- if (isNotifying()) {
- notify(ChangeKind.UNSET, _INTERNAL_DBL, oldDbl, DBL_DEFAULT_, oldDbl_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isSetDbl() {
- return dbl_set_;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public List<?> getTexts() {
- if (texts == null) {
- texts = createPropertyList(ListKind.DATATYPE, String.class, TEXTS, 0);
- }
- return texts;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve) {
- switch (propertyIndex) {
- case TEXT:
- return getText();
- case INT:
- return new Integer(getInt());
- case DBL:
- return new Double(getDbl());
- case TEXTS:
- return getTexts();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings({"unchecked", "rawtypes"})
- public void set(int propertyIndex, Object newValue) {
- switch (propertyIndex) {
- case TEXT:
- setText((String)newValue);
- return;
- case INT:
- setInt(((Integer)newValue).intValue());
- return;
- case DBL:
- setDbl(((Double)newValue).doubleValue());
- return;
- case TEXTS:
- getTexts().clear();
- Collection col = (Collection)newValue;
- List textsList = getTexts();
- textsList.addAll(col);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void unset(int propertyIndex) {
- switch (propertyIndex) {
- case TEXT:
- unsetText();
- return;
- case INT:
- unsetInt();
- return;
- case DBL:
- unsetDbl();
- return;
- case TEXTS:
- getTexts().clear();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isSet(int propertyIndex) {
- switch (propertyIndex) {
- case TEXT:
- return isSetText();
- case INT:
- return isSetInt();
- case DBL:
- return isSetDbl();
- case TEXTS:
- return texts != null && !texts.isEmpty();
- }
- return super.isSet(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String toString() {
- if (isProxy(this)) {
- return super.toString();
- }
-
- StringBuilder result = new StringBuilder(super.toString());
- result.append(" (text: ");
- if (text_set_) {
- result.append(text);
- } else {
- result.append("<unset>");
- }
- result.append(", int: ");
- if (int_set_) {
- result.append(int_);
- } else {
- result.append("<unset>");
- }
- result.append(", dbl: ");
- if (dbl_set_) {
- result.append(dbl);
- } else {
- result.append("<unset>");
- }
- result.append(", texts: ");
- result.append(texts);
- result.append(')');
- return result.toString();
- }
-
-}
-//CHECKSTYLE:ON
-
-
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/resources/jaxrs_databinding/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/resources/jaxrs_databinding/WEB-INF/beans.xml b/systests/jaxrs/src/test/resources/jaxrs_databinding/WEB-INF/beans.xml
index a60cae1..0c8db39 100644
--- a/systests/jaxrs/src/test/resources/jaxrs_databinding/WEB-INF/beans.xml
+++ b/systests/jaxrs/src/test/resources/jaxrs_databinding/WEB-INF/beans.xml
@@ -28,8 +28,6 @@
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<bean class="org.apache.cxf.systest.jaxrs.BookStoreSpring" id="serviceBean"/>
- <bean class="org.apache.cxf.systest.jaxrs.sdo.SDOResource" id="sdoBean"/>
- <bean class="org.apache.cxf.systest.jaxrs.sdo.SDOResource2" id="sdoBean2"/>
<jaxrs:server id="jaxbbook" address="/jaxb">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
@@ -52,20 +50,5 @@
</bean>
</jaxrs:dataBinding>
</jaxrs:server>
- <jaxrs:server id="sdo" address="/sdo">
- <jaxrs:serviceBeans>
- <ref bean="sdoBean"/>
- </jaxrs:serviceBeans>
- <jaxrs:dataBinding>
- <ref bean="sdoDatabinding"/>
- </jaxrs:dataBinding>
- </jaxrs:server>
- <jaxrs:server id="sdo2" address="/sdo2">
- <jaxrs:serviceBeans>
- <ref bean="sdoBean2"/>
- </jaxrs:serviceBeans>
- </jaxrs:server>
- <bean id="sdoDatabinding" class="org.apache.cxf.sdo.SDODataBinding"/>
-
</beans>
<!-- END SNIPPET: beans -->
[2/2] cxf git commit: [CXF-7196] Removing rt-databindings-sdo
Posted by se...@apache.org.
[CXF-7196] Removing rt-databindings-sdo
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/969a10c9
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/969a10c9
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/969a10c9
Branch: refs/heads/master
Commit: 969a10c9f2f9027a53c57fc757f62146bb219cd5
Parents: fb11380
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Fri Dec 23 13:54:39 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Fri Dec 23 13:54:39 2016 +0000
----------------------------------------------------------------------
.../features/src/main/resources/features.xml | 2 -
rt/databinding/pom.xml | 1 -
rt/databinding/sdo/pom.xml | 202 --------
.../java/org/apache/cxf/sdo/DataReaderImpl.java | 86 ----
.../java/org/apache/cxf/sdo/DataWriterImpl.java | 75 ---
.../org/apache/cxf/sdo/NodeDataWriterImpl.java | 64 ---
.../org/apache/cxf/sdo/SDOClassCollector.java | 50 --
.../java/org/apache/cxf/sdo/SDODataBinding.java | 224 --------
.../apache/cxf/sdo/tools/SDODatabinding.java | 289 -----------
.../resources/META-INF/cxf/java2wsbeans.xml | 22 -
.../main/resources/META-INF/tools-plugin.xml | 24 -
.../apache/cxf/sdo/AbstractHelloWorldTest.java | 71 ---
.../org/apache/cxf/sdo/AbstractSDOTest.java | 214 --------
.../apache/cxf/sdo/HelloWorldDynamicTest.java | 87 ----
.../apache/cxf/sdo/HelloWorldStaticTest.java | 87 ----
.../src/test/java/org/apache/cxf/sdo/bean11.xml | 9 -
.../test/java/org/apache/cxf/sdo/structure.xml | 15 -
.../test/resources/wsdl_sdo/HelloService.wsdl | 197 -------
.../wsdl_sdo/HelloService_dynamic.wsdl | 27 -
.../resources/wsdl_sdo/HelloService_static.wsdl | 27 -
systests/jaxrs/pom.xml | 6 -
.../cxf/systest/jaxrs/JAXRSDataBindingTest.java | 27 +-
.../cxf/systest/jaxrs/sdo/SDOResource.java | 46 --
.../cxf/systest/jaxrs/sdo/SDOResource2.java | 26 -
.../cxf/systest/jaxrs/sdo/SdoFactory.java | 30 --
.../apache/cxf/systest/jaxrs/sdo/Structure.java | 59 ---
.../systest/jaxrs/sdo/impl/SdoFactoryImpl.java | 184 -------
.../systest/jaxrs/sdo/impl/StructureImpl.java | 511 -------------------
.../jaxrs_databinding/WEB-INF/beans.xml | 17 -
29 files changed, 1 insertion(+), 2678 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/osgi/karaf/features/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/osgi/karaf/features/src/main/resources/features.xml b/osgi/karaf/features/src/main/resources/features.xml
index 457a582..90ce5e5 100644
--- a/osgi/karaf/features/src/main/resources/features.xml
+++ b/osgi/karaf/features/src/main/resources/features.xml
@@ -433,8 +433,6 @@
-->
<!-- need msv
<bundle>mvn:org.apache.cxf/cxf-wstx-msv-validation/${project.version}</bundle-->
- <!-- need sdo deps
- <bundle>mvn:org.apache.cxf/cxf-rt-databinding-sdo/${project.version}</bundle-->
</feature>
<feature name="cxf-sts" version="${project.version}">
<bundle start-level="40" dependency="true">mvn:com.hazelcast/hazelcast/${cxf.hazelcast.version}</bundle>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/pom.xml
----------------------------------------------------------------------
diff --git a/rt/databinding/pom.xml b/rt/databinding/pom.xml
index 438dc94..6f8e30a 100644
--- a/rt/databinding/pom.xml
+++ b/rt/databinding/pom.xml
@@ -33,6 +33,5 @@
<module>jaxb</module>
<module>xmlbeans</module>
<module>aegis</module>
- <module>sdo</module>
</modules>
</project>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/pom.xml
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/pom.xml b/rt/databinding/sdo/pom.xml
deleted file mode 100644
index 2a4dc87..0000000
--- a/rt/databinding/sdo/pom.xml
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>cxf-rt-databinding-sdo</artifactId>
- <packaging>bundle</packaging>
- <name>Apache CXF Runtime SDO DataBinding</name>
- <description>Apache CXF Runtime SDO DataBinding</description>
- <url>http://cxf.apache.org</url>
- <parent>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-parent</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <relativePath>../../../parent/pom.xml</relativePath>
- </parent>
- <properties>
- <cxf.pmd.eclipse.ruleset.ext>-generated</cxf.pmd.eclipse.ruleset.ext>
- <cxf.compile.flags>-Xlint:unchecked,fallthrough,finally</cxf.compile.flags>
- <cxf.compile.show.deprecation>false</cxf.compile.show.deprecation>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-impl</artifactId>
- <version>1.1.1</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-tools</artifactId>
- <version>1.1.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-tools-wsdlto-core</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-testutils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-local</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxws</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <repositories>
- <!-- temporary add the apache snapshot repo so tuscany folks can just grab this module and build it -->
- <repository>
- <id>apache.snapshots</id>
- <name>Apache Snapshot Repository</name>
- <url>http://repository.apache.org/snapshots</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-codegen-plugin</artifactId>
- <version>${project.version}</version>
- <executions>
- <execution>
- <id>generate-test-sources-static</id>
- <phase>generate-test-sources</phase>
- <configuration>
- <fork>${cxf.codegenplugin.forkmode}</fork>
- <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
- <testWsdlRoot>${basedir}/src/test/resources/wsdl_sdo</testWsdlRoot>
- <defaultOptions>
- <markGenerated>true</markGenerated>
- <faultSerialVersionUID>1</faultSerialVersionUID>
- </defaultOptions>
- <wsdlOptions>
- <wsdlOption>
- <wsdl>${basedir}/src/test/resources/wsdl_sdo/HelloService_static.wsdl</wsdl>
- <extraargs>
- <extraarg>-db</extraarg>
- <extraarg>sdo</extraarg>
- <extraarg>-p</extraarg>
- <extraarg>http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types=helloworld.static_types.sdo</extraarg>
- <extraarg>-p</extraarg>
- <extraarg>http://apache.org/cxf/databinding/sdo/hello_world_soap_http=helloworld.static_types.ws</extraarg>
- </extraargs>
- </wsdlOption>
- <wsdlOption>
- <wsdl>${basedir}/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl</wsdl>
- <extraargs>
- <extraarg>-db</extraarg>
- <extraarg>sdo-dynamic</extraarg>
- <extraarg>-p</extraarg>
- <extraarg>http://apache.org/cxf/databinding/sdo/hello_world_soap_http=helloworld.dynamic_types.ws</extraarg>
- </extraargs>
- </wsdlOption>
- </wsdlOptions>
- </configuration>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>setup.eclipse</id>
- <build>
- <defaultGoal>process-test-sources</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>setup.eclipse.project.sdo</id>
- <phase>process-test-sources</phase>
- <configuration>
- <target>
- <!-- SDO generated code is Java1.4 based and thus uses raw List types -->
- <!-- It also generates code with unused imports -->
- <propertyfile file="${basedir}/.settings/org.eclipse.jdt.core.prefs">
- <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.unusedLocal" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation" value="ignore" />
- </propertyfile>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java b/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
deleted file mode 100644
index d4add18..0000000
--- a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.sdo;
-
-import java.util.Collection;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.validation.Schema;
-
-
-import org.apache.cxf.databinding.DataReader;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Attachment;
-import org.apache.cxf.service.model.MessagePartInfo;
-import org.apache.cxf.staxutils.StaxUtils;
-
-import commonj.sdo.helper.HelperContext;
-
-public class DataReaderImpl implements DataReader<XMLStreamReader> {
- HelperContext context;
- Object xmlStreamHelper;
-
- public DataReaderImpl(HelperContext context) {
- this.context = context;
- try {
- xmlStreamHelper = context.getClass().getMethod("getXMLStreamHelper",
- new Class[0]).invoke(context);
- } catch (Throwable t) {
- xmlStreamHelper = null;
- }
- }
-
- public Object read(XMLStreamReader input) {
- return read(null, input);
- }
-
- public Object read(MessagePartInfo part, XMLStreamReader reader) {
- if (xmlStreamHelper != null) {
- try {
- if (reader.getEventType() == XMLStreamReader.START_DOCUMENT) {
- StaxUtils.toNextTag(reader);
- }
- Object o = xmlStreamHelper.getClass().getMethod("loadObject",
- new Class[] {XMLStreamReader.class})
- .invoke(xmlStreamHelper, reader);
-
- return o;
- } catch (Exception e) {
- throw new Fault(e);
- }
- }
- return null;
- }
-
- public Object read(QName name, XMLStreamReader input, Class<?> type) {
- return read(null, input);
- }
-
-
- public void setAttachments(Collection<Attachment> attachments) {
- }
-
- public void setProperty(String prop, Object value) {
- }
-
- public void setSchema(Schema s) {
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataWriterImpl.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataWriterImpl.java b/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataWriterImpl.java
deleted file mode 100644
index 0b67817..0000000
--- a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataWriterImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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.sdo;
-
-import java.util.Collection;
-
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.validation.Schema;
-
-
-import org.apache.cxf.databinding.DataWriter;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Attachment;
-import org.apache.cxf.service.model.MessagePartInfo;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-public class DataWriterImpl implements DataWriter<XMLStreamWriter> {
- HelperContext context;
- Object xmlStreamHelper;
-
- public DataWriterImpl(HelperContext context) {
- this.context = context;
- try {
- xmlStreamHelper = context.getClass().getMethod("getXMLStreamHelper",
- new Class[0]).invoke(context);
- } catch (Throwable t) {
- xmlStreamHelper = null;
- }
- }
-
- public void write(Object obj, XMLStreamWriter output) {
- write(obj, null, output);
- }
-
- public void write(Object obj, MessagePartInfo part, XMLStreamWriter output) {
- try {
- xmlStreamHelper.getClass().getMethod("saveObject",
- new Class[] {DataObject.class,
- XMLStreamWriter.class})
- .invoke(xmlStreamHelper, obj, output);
- } catch (Exception ex) {
- throw new Fault(ex);
- }
-
- }
-
-
- public void setAttachments(Collection<Attachment> attachments) {
- }
-
- public void setProperty(String key, Object value) {
- }
-
- public void setSchema(Schema schema) {
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/NodeDataWriterImpl.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/NodeDataWriterImpl.java b/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/NodeDataWriterImpl.java
deleted file mode 100644
index 5d79cc4..0000000
--- a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/NodeDataWriterImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.sdo;
-
-
-import java.util.Collection;
-import javax.xml.validation.Schema;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-
-import org.apache.cxf.databinding.DataWriter;
-import org.apache.cxf.message.Attachment;
-import org.apache.cxf.service.model.MessagePartInfo;
-import org.apache.cxf.staxutils.W3CDOMStreamWriter;
-
-import commonj.sdo.helper.HelperContext;
-
-public class NodeDataWriterImpl implements DataWriter<Node> {
- DataWriterImpl writer;
-
- public NodeDataWriterImpl(HelperContext ctx) {
- writer = new DataWriterImpl(ctx);
- }
-
- public void write(Object obj, Node output) {
- write(obj, null, output);
- }
-
- public void write(Object obj, MessagePartInfo part, Node output) {
- W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter((Element)output);
- writer.write(obj, part, domWriter);
- }
-
- public void setAttachments(Collection<Attachment> attachments) {
- writer.setAttachments(attachments);
- }
-
- public void setProperty(String key, Object value) {
- writer.setProperty(key, value);
- }
-
- public void setSchema(Schema s) {
- writer.setSchema(s);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDOClassCollector.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDOClassCollector.java b/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDOClassCollector.java
deleted file mode 100644
index 025c81b..0000000
--- a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDOClassCollector.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.sdo;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.cxf.service.ServiceModelVisitor;
-import org.apache.cxf.service.model.MessagePartInfo;
-import org.apache.cxf.service.model.ServiceInfo;
-
-/**
- *
- */
-class SDOClassCollector extends ServiceModelVisitor {
- Set<Class<?>> classes = new HashSet<Class<?>>();
-
- SDOClassCollector(ServiceInfo serviceInfo) {
- super(serviceInfo);
- }
-
- public Set<Class<?>> getClasses() {
- return classes;
- }
-
- @Override
- public void begin(MessagePartInfo part) {
- Class<?> cls = part.getTypeClass();
- if (cls != null) {
- classes.add(cls);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java b/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java
deleted file mode 100644
index d8a5262..0000000
--- a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/SDODataBinding.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.sdo;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.w3c.dom.Node;
-
-import org.apache.cxf.databinding.AbstractDataBinding;
-import org.apache.cxf.databinding.DataReader;
-import org.apache.cxf.databinding.DataWriter;
-import org.apache.cxf.databinding.WrapperCapableDatabinding;
-import org.apache.cxf.databinding.WrapperHelper;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.model.ServiceInfo;
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.constants.Constants;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.impl.HelperProvider;
-
-
-/**
- *
- */
-public class SDODataBinding extends AbstractDataBinding
- implements WrapperCapableDatabinding {
-
- private final class SDOWrapperHelper implements WrapperHelper {
- private final List<String> partNames;
- private Method fact;
- private Object factory;
- private QName wrapperName;
-
- private SDOWrapperHelper(List<String> partNames, Class<?> wrapperType, QName wrapperName) {
- this.partNames = partNames;
- if (DataObject.class != wrapperType) {
- try {
- String s = wrapperType.getPackage().getName() + ".SdoFactory";
- Class<?> cls = Class.forName(s, false, wrapperType.getClassLoader());
- for (Method m : cls.getMethods()) {
- if (m.getReturnType() == wrapperType) {
- fact = m;
- break;
- }
- }
- factory = cls.getField("INSTANCE").get(null);
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
- this.wrapperName = wrapperName;
- }
-
- public Object createWrapperObject(List<?> lst) throws Fault {
- DataObject o;
- if (fact != null) {
- try {
- o = (DataObject)fact.invoke(factory);
- } catch (Exception e) {
- throw new Fault(e);
- }
- } else {
- o = context.getDataFactory().create(wrapperName.getNamespaceURI(),
- wrapperName.getLocalPart());
- }
- for (int x = 0; x < lst.size(); x++) {
- o.set(partNames.get(x), lst.get(x));
- }
- return o;
- }
-
- public String getSignature() {
- return "" + System.identityHashCode(this);
- }
-
- public List<Object> getWrapperParts(Object o) throws Fault {
- List<Object> lst = new ArrayList<Object>();
- DataObject obj = (DataObject)o;
- for (String s : partNames) {
- lst.add(obj.get(s));
- }
- return lst;
- }
- }
-
-
-
- private static final Class<?> SUPPORTED_READER_FORMATS[] = new Class<?>[] {XMLStreamReader.class};
- private static final Class<?> SUPPORTED_WRITER_FORMATS[]
- = new Class<?>[] {XMLStreamWriter.class, Node.class};
- HelperProvider provider;
- HelperContext context;
-
- public void initialize(Service service) {
- context = SDOUtil.createHelperContext();
-
- Set<String> pkgs = new HashSet<String>();
- for (ServiceInfo serviceInfo : service.getServiceInfos()) {
- SDOClassCollector cc = new SDOClassCollector(serviceInfo);
- cc.walk();
-
- for (Class<?> cls : cc.getClasses()) {
- if (DataObject.class == cls) {
- continue;
- }
- String pkg = cls.getPackage().getName();
- if (!pkgs.contains(pkg)) {
- try {
- Class<?> fact = Class.forName(pkg + ".SdoFactory", false, cls.getClassLoader());
- registerFactory(fact);
- pkgs.add(pkg);
- } catch (Throwable t) {
- //ignore, register the class itself
- register(cls);
- }
- }
- }
- }
- for (ServiceInfo serviceInfo : service.getServiceInfos()) {
- for (XmlSchema schema : serviceInfo.getXmlSchemaCollection().getXmlSchemas()) {
- if (schema.getTargetNamespace().equals(Constants.URI_2001_SCHEMA_XSD)) {
- continue;
- }
- StringWriter writer = new StringWriter();
- schema.write(writer);
- context.getXSDHelper().define(new StringReader(writer.toString()), schema.getSourceURI());
- }
- }
- }
- void registerFactory(Class<?> factoryClass) throws Exception {
- Field field = factoryClass.getField("INSTANCE");
- Object factory = field.get(null);
- Method method = factory.getClass().getMethod("register", new Class[] {HelperContext.class});
- method.invoke(factory, new Object[] {context});
- }
- boolean register(Class<?> javaType) {
- if (javaType == null || DataObject.class == javaType) {
- return false;
- }
- try {
- Type type = context.getTypeHelper().getType(javaType);
- if (type != null && (!type.isDataType())) {
- Method method = type.getClass().getMethod("getEPackage");
- Object factory = method.invoke(type, new Object[] {});
- method = factory.getClass().getMethod("register", HelperContext.class);
- method.invoke(factory, new Object[] {context});
- return true;
- }
- return false;
- } catch (Exception e) {
- e.printStackTrace();
- }
- return false;
- }
- @SuppressWarnings("unchecked")
- public <T> DataReader<T> createReader(Class<T> c) {
- DataReader<T> dr = null;
- if (c == XMLStreamReader.class) {
- dr = (DataReader<T>)new DataReaderImpl(context);
- }
- return dr;
- }
- @SuppressWarnings("unchecked")
- public <T> DataWriter<T> createWriter(Class<T> c) {
- if (c == XMLStreamWriter.class) {
- return (DataWriter<T>)new DataWriterImpl(context);
- } else if (c == Node.class) {
- return (DataWriter<T>)new NodeDataWriterImpl(context);
- }
- return null;
- }
- public Class<?>[] getSupportedReaderFormats() {
- return SUPPORTED_READER_FORMATS;
- }
-
- public Class<?>[] getSupportedWriterFormats() {
- return SUPPORTED_WRITER_FORMATS;
- }
-
-
-
- public WrapperHelper createWrapperHelper(final Class<?> wrapperType,
- final QName wrapperName,
- final List<String> partNames,
- final List<String> elTypeNames,
- final List<Class<?>> partClasses) {
-
-
- return new SDOWrapperHelper(partNames, wrapperType, wrapperName);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java b/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java
deleted file mode 100644
index c4c16e1..0000000
--- a/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/tools/SDODatabinding.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/**
- * 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.sdo.tools;
-
-import java.io.File;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.cxf.common.xmlschema.SchemaCollection;
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.tools.common.ToolConstants;
-import org.apache.cxf.tools.common.ToolContext;
-import org.apache.cxf.tools.common.ToolException;
-import org.apache.cxf.tools.common.model.DefaultValueWriter;
-import org.apache.cxf.tools.util.ClassCollector;
-import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
-import org.apache.tuscany.sdo.generate.XSD2JavaGenerator;
-import org.apache.tuscany.sdo.helper.HelperContextImpl;
-import org.apache.tuscany.sdo.helper.XSDHelperImpl;
-import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.constants.Constants;
-import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
-import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
-import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
-import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public class SDODatabinding extends XSD2JavaGenerator implements DataBindingProfile {
- private static final String DATABINDING_DYNAMIC_SDO = "sdo-dynamic";
-
- private TypeHelper typeHelper;
- private XSDHelper xsdHelper;
-
- private boolean dynamic;
- private ExtendedMetaData extendedMetaData;
- private GenModel genModel;
- private Map<EClassifier, GenClass> genClasses = new HashMap<EClassifier, GenClass>();
- private SchemaCollection schemaCollection;
- private EPackage.Registry packageRegistry;
-
- public void initialize(ToolContext context) throws ToolException {
- context.put(ToolConstants.RUNTIME_DATABINDING_CLASS,
- "org.apache.cxf.sdo.SDODataBinding.class");
- String databinding = (String)context.get(ToolConstants.CFG_DATABINDING);
- if (DATABINDING_DYNAMIC_SDO.equalsIgnoreCase(databinding)) {
- dynamic = true;
- }
-
- generatedPackages = null;
- String outputDir = (String)context.get(ToolConstants.CFG_OUTPUTDIR);
- String pkg = context.getPackageName();
-
-
- // preparing the directories where files to be written.
- File targetDir;
- if (outputDir == null) {
- String wsdl = (String)context.get(ToolConstants.CFG_WSDLLOCATION);
- try {
- outputDir = new File(new URI(wsdl)).getParentFile().getAbsolutePath();
- } catch (URISyntaxException e) {
- outputDir = new File(".").getAbsolutePath();
- }
- }
- targetDir = new File(outputDir);
- targetDir.mkdirs();
-
- List<String> argList = new ArrayList<String>();
- argList.add("-targetDirectory");
- argList.add(targetDir.getAbsolutePath());
-
- if (pkg != null) {
- argList.add("-javaPackage");
- argList.add(pkg);
- }
- schemaCollection = (SchemaCollection) context.get(ToolConstants.XML_SCHEMA_COLLECTION);
-
- argList.add(""); //bogus arg
- String[] args = argList.toArray(new String[argList.size()]);
-
- packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
- extendedMetaData = new BasicExtendedMetaData(packageRegistry);
- HelperContext hc = new HelperContextImpl(extendedMetaData, false);
- xsdHelper = hc.getXSDHelper();
- typeHelper = hc.getTypeHelper();
-
-
- processArguments(args);
-
- ((XSDHelperImpl)xsdHelper).setRedefineBuiltIn(generateBuiltIn);
- for (XmlSchema schema : schemaCollection.getXmlSchemas()) {
- if (schema.getTargetNamespace().equals(Constants.URI_2001_SCHEMA_XSD)) {
- continue;
- }
- StringWriter writer = new StringWriter();
- schema.write(writer);
- xsdHelper.define(new StringReader(writer.toString()), schema.getSourceURI());
- }
- }
- public void generate(ToolContext context) throws ToolException {
- Map<String, String> ns2pkgMap = context.getNamespacePackageMap();
- Map<String, PackageInfo> packageInfoTable =
- createPackageInfoTable(schemaCollection, ns2pkgMap);
- ClassCollector classCollector = context.get(ClassCollector.class);
- try {
- if (!dynamic) {
- // No XSD2Java is needed for dynamic SDO
-
- genModel = generatePackages(packageRegistry.values(), targetDirectory,
- new Hashtable<String, PackageInfo>(packageInfoTable),
- genOptions, allNamespaces);
-
-
- List<GenPackage> packages = CastUtils.cast(genModel.getGenPackages());
- for (Iterator<GenPackage> iter = packages.iterator(); iter.hasNext();) {
- // loop through the list, once to build up the eclass to genclass mapper
- GenPackage genPackage = iter.next();
- List<GenClass> classes = CastUtils.cast(genPackage.getGenClasses());
- for (Iterator<GenClass> classIter = classes.iterator(); classIter.hasNext();) {
- GenClass genClass = classIter.next();
- genClasses.put(genClass.getEcoreClass(), genClass);
-
- //This gets the "impl" classes, how do we get everything else?
- String s = genClass.getQualifiedClassName();
- String p = s.substring(0, s.lastIndexOf('.'));
- s = s.substring(s.lastIndexOf('.') + 1);
- classCollector.addTypesClassName(p,
- s,
- genClass.getQualifiedClassName());
-
- p = genClass.getGenPackage().getInterfacePackageName();
- s = genClass.getInterfaceName();
- classCollector.addTypesClassName(p,
- s,
- p + "." + s);
- }
- String p = genPackage.getInterfacePackageName();
- String s = genPackage.getFactoryInterfaceName();
- classCollector.addTypesClassName(p,
- s,
- p + "." + s);
- p = genPackage.getClassPackageName();
- s = genPackage.getFactoryClassName();
- classCollector.addTypesClassName(p,
- s,
- p + "." + s);
- }
- }
- } catch (Exception e) {
- throw new ToolException(e);
- }
-
- }
-
-
- private Map<String, PackageInfo> createPackageInfoTable(SchemaCollection schemas,
- Map<String, String> ns2PkgMap) {
- Map<String, PackageInfo> packageInfoTable = new HashMap<String, PackageInfo>();
-
- if (ns2PkgMap != null && !ns2PkgMap.isEmpty()) {
- for (Map.Entry<String, String> e : ns2PkgMap.entrySet()) {
- packageInfoTable.put(e.getKey(), new PackageInfo(e.getValue(), null, e.getKey(), null));
- }
- } else {
- for (XmlSchema schema : schemas.getXmlSchemas()) {
- packageInfoTable.put(schema.getTargetNamespace(),
- new PackageInfo(javaPackage, prefix, schema.getTargetNamespace(), null));
- }
- }
- return packageInfoTable;
- }
-
-
-
- public String getType(QName qName, boolean element) {
- Type type = null;
- if (element) {
- Property property = xsdHelper.getGlobalProperty(qName.getNamespaceURI(),
- qName.getLocalPart(), true);
- if (property != null) {
- type = property.getType();
- }
- }
- if (type == null) {
- type = typeHelper.getType(qName.getNamespaceURI(), qName.getLocalPart());
- }
- if (type != null) {
- return getClassName(type);
- }
- return DataObject.class.getName();
- }
-
- private String getClassName(Type type) {
- EClassifier eClassifier = (EClassifier)type;
- String name = eClassifier.getInstanceClassName();
- if (name != null) {
- return name;
- }
-
- if (genModel == null) {
- if (dynamic) {
- return DataObject.class.getName();
- }
- return type.getName();
- }
-
- if (eClassifier instanceof EClass) {
- // complex type
- GenClass genEClass = genClasses.get(eClassifier);
- if (genEClass != null) {
- name = genEClass.getGenPackage().getInterfacePackageName()
- + '.' + genEClass.getInterfaceName();
-
- }
- } else {
- // simple type
- name = eClassifier.getInstanceClass().getName();
- }
- return name;
-
- }
-
- public String getWrappedElementType(QName wrapperElement, QName item) {
- Type type = null;
- Property property =
- xsdHelper.getGlobalProperty(wrapperElement.getNamespaceURI(),
- wrapperElement.getLocalPart(), true);
-
- if (property != null) {
- type = property.getType();
- Property itemProp = type.getProperty(item.getLocalPart());
- if (itemProp != null) {
- type = itemProp.getType();
- }
- }
- if (type != null) {
- return getClassName(type);
- }
- return DataObject.class.getName();
- }
-
- public DefaultValueWriter createDefaultValueWriter(QName qName, boolean b) {
- // since we dont need any sample client/server code with default values we return null
- return null;
- }
-
- public DefaultValueWriter createDefaultValueWriterForWrappedElement(QName qName, QName qName1) {
- // since we dont need any sample client/server code with default values we return null
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/resources/META-INF/cxf/java2wsbeans.xml
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/resources/META-INF/cxf/java2wsbeans.xml b/rt/databinding/sdo/src/main/resources/META-INF/cxf/java2wsbeans.xml
deleted file mode 100644
index acef1ee..0000000
--- a/rt/databinding/sdo/src/main/resources/META-INF/cxf/java2wsbeans.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd">
- <bean id="SdoDatabindingBean" class="org.apache.cxf.sdo.SDODataBinding" scope="prototype"/>
-</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/main/resources/META-INF/tools-plugin.xml
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/main/resources/META-INF/tools-plugin.xml b/rt/databinding/sdo/src/main/resources/META-INF/tools-plugin.xml
deleted file mode 100644
index 63befee..0000000
--- a/rt/databinding/sdo/src/main/resources/META-INF/tools-plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<plugin xmlns="http://cxf.apache.org/tools/plugin" name="sdo" version="" provider="tuscany.apache.org">
- <databinding name="sdo" package="org.apache.cxf.sdo.tools" profile="SDODatabinding"/>
- <databinding name="sdo-dynamic" package="org.apache.cxf.sdo.tools" profile="SDODatabinding"/>
- <databinding name="sdo-static" package="org.apache.cxf.sdo.tools" profile="SDODatabinding"/>
-</plugin>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java b/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java
deleted file mode 100644
index bebd329..0000000
--- a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractHelloWorldTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * 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.sdo;
-
-
-import java.util.Collection;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import org.junit.Test;
-
-
-/**
- *
- */
-public abstract class AbstractHelloWorldTest extends AbstractSDOTest {
-
-
- @Test
- public void testBasicInvoke() throws Exception {
- Node response = invoke("TestService", "bean11.xml");
- addNamespace("ns1", "http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types");
- assertValid("/s:Envelope/s:Body/ns1:greetMeResponse", response);
- assertValid("//ns1:greetMeResponse/ns1:responseType", response);
- assertValid("//ns1:greetMeResponse/ns1:responseType[text()='Hello World']", response);
- }
-
- @Test
- public void testStructure() throws Exception {
- Node response = invoke("TestService", "structure.xml");
- addNamespace("ns1", "http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types");
- assertValid("/s:Envelope/s:Body/ns1:echoStructResponse", response);
- assertValid("//ns1:echoStructResponse/ns1:return", response);
- assertValid("//ns1:echoStructResponse/ns1:return/ns1:text[text()='Hello']", response);
- }
-
- @Test
- public void testWSDL() throws Exception {
- Collection<Document> docs = getWSDLDocuments("TestService");
- for (Document doc : docs) {
- try {
- assertValid("/wsdl:definitions/wsdl:types/xsd:schema"
- + "[@targetNamespace='http://apache.org/cxf"
- + "/databinding/sdo/hello_world_soap_http/types']",
- doc);
- return;
- } catch (AssertionError ex) {
- //ignore
- }
- }
- fail("Did not find schemas");
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractSDOTest.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractSDOTest.java b/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractSDOTest.java
deleted file mode 100644
index 844b3b9..0000000
--- a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/AbstractSDOTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * 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.sdo;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Import;
-import javax.wsdl.WSDLException;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLWriter;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusException;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.binding.BindingFactoryManager;
-import org.apache.cxf.binding.soap.SoapBindingFactory;
-import org.apache.cxf.binding.soap.SoapTransportFactory;
-import org.apache.cxf.bus.extension.ExtensionManagerBus;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.endpoint.ServerRegistry;
-import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
-import org.apache.cxf.frontend.ServerFactoryBean;
-import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.test.AbstractCXFTest;
-import org.apache.cxf.tools.wsdlto.core.WSDLDefinitionBuilder;
-import org.apache.cxf.transport.ConduitInitiatorManager;
-import org.apache.cxf.transport.DestinationFactoryManager;
-import org.apache.cxf.transport.local.LocalTransportFactory;
-import org.apache.cxf.wsdl.WSDLConstants;
-import org.apache.cxf.wsdl.WSDLManager;
-import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
-import org.apache.cxf.wsdl11.WSDLManagerImpl;
-
-import org.junit.Before;
-
-public abstract class AbstractSDOTest extends AbstractCXFTest {
- protected LocalTransportFactory localTransport;
-
-
- @Before
- public void setUp() throws Exception {
- super.setUpBus();
-
- SoapBindingFactory bindingFactory = new SoapBindingFactory();
- bindingFactory.setBus(bus);
-
- bus.getExtension(BindingFactoryManager.class)
- .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory);
-
- DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
-
- SoapTransportFactory soapDF = new SoapTransportFactory();
- dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF);
- dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soapDF);
- dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", soapDF);
-
- localTransport = new LocalTransportFactory();
- dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport);
- dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport);
- dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat", localTransport);
- dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", localTransport);
-
- ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
- extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport);
- extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/", localTransport);
- extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport);
- extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/", localTransport);
-
- bus.setExtension(new WSDLManagerImpl(), WSDLManager.class);
-
-
- addNamespace("wsdl", WSDLConstants.NS_WSDL11);
- addNamespace("wsdlsoap", WSDLConstants.NS_SOAP11);
- addNamespace("xsd", WSDLConstants.NS_SCHEMA_XSD);
- }
-
- @Override
- protected Bus createBus() throws BusException {
- ExtensionManagerBus bus = new ExtensionManagerBus();
- BusFactory.setDefaultBus(bus);
- return bus;
- }
-
- protected Node invoke(String service, String message) throws Exception {
- return invoke("local://" + service, LocalTransportFactory.TRANSPORT_ID, message);
- }
- protected Node invoke(String service, byte[] message) throws Exception {
- return invoke("local://" + service, LocalTransportFactory.TRANSPORT_ID, message);
- }
-
- public Server createService(Class<?> serviceClass, QName name) {
- return createService(serviceClass, null, name);
- }
-
- public Server createService(Class<?> serviceClass, Object serviceBean, QName name) {
- return createService(serviceClass, serviceBean, serviceClass.getSimpleName(), name);
- }
-
- protected Server createService(Class<?> serviceClass, QName name, SDODataBinding binding) {
- return createService(serviceClass, serviceClass.getSimpleName(), name, binding);
- }
-
- protected Server createService(Class<?> serviceClass,
- String address, QName name,
- SDODataBinding binding) {
- ServerFactoryBean sf = createServiceFactory(serviceClass, null, address, name, binding);
- return sf.create();
- }
-
- public Server createService(Class<?> serviceClass,
- Object serviceBean,
- String address,
- QName name) {
- ServerFactoryBean sf = createServiceFactory(serviceClass, serviceBean, address, name, null);
- return sf.create();
- }
-
- protected ServerFactoryBean createServiceFactory(Class<?> serviceClass,
- Object serviceBean,
- String address,
- QName name,
- SDODataBinding binding) {
- JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
- sf.setServiceClass(serviceClass);
- if (serviceBean != null) {
- sf.setServiceBean(serviceBean);
- }
- sf.getServiceFactory().setServiceName(name);
- sf.setAddress("local://" + address);
- sf.getServiceFactory().setQualifyWrapperSchema(true);
- setupSDO(sf, binding);
- return sf;
- }
- protected void setupSDO(AbstractWSDLBasedEndpointFactory sf) {
- setupSDO(sf, null);
- }
- protected void setupSDO(AbstractWSDLBasedEndpointFactory sf, SDODataBinding binding) {
- if (binding == null) {
- binding = new SDODataBinding();
- }
- sf.getServiceFactory().setDataBinding(binding);
- }
-
- protected Collection<Document> getWSDLDocuments(String string) throws WSDLException {
- WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
-
- Collection<Document> docs = new ArrayList<Document>();
- Definition definition = getWSDLDefinition(string);
- if (definition == null) {
- return null;
- }
- docs.add(writer.getDocument(definition));
-
- for (Import wsdlImport : WSDLDefinitionBuilder.getImports(definition)) {
- docs.add(writer.getDocument(wsdlImport.getDefinition()));
- }
- return docs;
- }
-
- protected Definition getWSDLDefinition(String string) throws WSDLException {
- ServerRegistry svrMan = getBus().getExtension(ServerRegistry.class);
- for (Server s : svrMan.getServers()) {
- Service svc = s.getEndpoint().getService();
- if (svc.getName().getLocalPart().equals(string)) {
- ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
- return builder.build();
- }
- }
- String localString = "local://" + string;
- for (Server s : svrMan.getServers()) {
- String s2 = s.getDestination().getAddress().getAddress().getValue();
- if (localString.equals(s2)) {
- Service svc = s.getEndpoint().getService();
- ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
- return builder.build();
- }
- }
- return null;
-
- }
-
- protected Document getWSDLDocument(String string) throws WSDLException {
- Definition definition = getWSDLDefinition(string);
- if (definition == null) {
- return null;
- }
- WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
- return writer.getDocument(definition);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldDynamicTest.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldDynamicTest.java b/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldDynamicTest.java
deleted file mode 100644
index ebabe43..0000000
--- a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldDynamicTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.sdo;
-
-
-import javax.jws.WebService;
-import javax.xml.namespace.QName;
-
-
-import org.apache.cxf.frontend.ServerFactoryBean;
-
-import org.junit.Before;
-
-import commonj.sdo.DataObject;
-
-
-/**
- *
- */
-public class HelloWorldDynamicTest extends AbstractHelloWorldTest {
-
-
- @Before
- public void setUp() throws Exception {
- super.setUp();
- createService(Server.class, new Server(), "TestService", null);
- }
-
-
- @WebService(targetNamespace = "http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
- name = "Greeter",
- serviceName = "TestService",
- endpointInterface = "helloworld.dynamic_types.ws.Greeter")
- public static class Server implements helloworld.dynamic_types.ws.Greeter {
- public java.lang.String sayHi() {
- return "Hi!";
- }
-
- public void pingMe() {
- }
-
- public void greetMeOneWay(String s) {
- }
-
- public java.lang.String greetMe(String s) {
- return "Hello " + s;
- }
-
- public DataObject echoStruct(DataObject struct) {
- return struct;
- }
- }
-
-
- protected ServerFactoryBean createServiceFactory(Class<?> serviceClass,
- Object serviceBean,
- String address,
- QName name,
- SDODataBinding binding) {
- ServerFactoryBean sf = super.createServiceFactory(serviceClass, serviceBean, address, name, binding);
- sf.setWsdlLocation(HelloWorldStaticTest.class
- .getResource("/wsdl_sdo/HelloService_dynamic.wsdl").toString());
- sf.setServiceName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
- "SOAPService"));
- sf.setEndpointName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
- "SoapPort"));
- return sf;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldStaticTest.java
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldStaticTest.java b/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldStaticTest.java
deleted file mode 100644
index 042234c..0000000
--- a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/HelloWorldStaticTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.sdo;
-
-
-
-import javax.jws.WebService;
-import javax.xml.namespace.QName;
-
-
-import org.apache.cxf.frontend.ServerFactoryBean;
-
-import org.junit.Before;
-
-import helloworld.static_types.sdo.Structure;
-
-/**
- *
- */
-public class HelloWorldStaticTest extends AbstractHelloWorldTest {
-
-
- @Before
- public void setUp() throws Exception {
- super.setUp();
- createService(Server.class, new Server(), "TestService", null);
- }
-
-
- @WebService(targetNamespace = "http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
- name = "Greeter",
- serviceName = "TestService",
- endpointInterface = "helloworld.static_types.ws.Greeter")
- public static class Server implements helloworld.static_types.ws.Greeter {
- public java.lang.String sayHi() {
- return "Hi!";
- }
-
- public void pingMe() {
- }
-
- public void greetMeOneWay(String s) {
- }
-
- public java.lang.String greetMe(String s) {
- return "Hello " + s;
- }
-
- public Structure echoStruct(Structure struct) {
- return struct;
- }
- }
-
-
- protected ServerFactoryBean createServiceFactory(Class<?> serviceClass,
- Object serviceBean,
- String address,
- QName name,
- SDODataBinding binding) {
- ServerFactoryBean sf = super.createServiceFactory(serviceClass, serviceBean, address, name, binding);
- sf.setWsdlLocation(HelloWorldStaticTest.class
- .getResource("/wsdl_sdo/HelloService_static.wsdl").toString());
- sf.setServiceName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
- "SOAPService"));
- sf.setEndpointName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
- "SoapPort"));
- return sf;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/bean11.xml
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/bean11.xml b/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/bean11.xml
deleted file mode 100644
index 662d42b..0000000
--- a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/bean11.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
- <env:Header/>
- <env:Body>
- <ns1:greetMe xmlns:ns1="http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types">
- <ns1:requestType>World</ns1:requestType>
- </ns1:greetMe>
- </env:Body>
-</env:Envelope>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/structure.xml
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/structure.xml b/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/structure.xml
deleted file mode 100644
index 8dde176..0000000
--- a/rt/databinding/sdo/src/test/java/org/apache/cxf/sdo/structure.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
- <env:Header/>
- <env:Body>
- <echoStruct xmlns="http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types">
- <struct>
- <text>Hello</text>
- <int>24</int>
- <dbl>3.14159</dbl>
- <texts>Hello</texts>
- <texts>World</texts>
- </struct>
- </echoStruct>
- </env:Body>
-</env:Envelope>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl b/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl
deleted file mode 100644
index 719627a..0000000
--- a/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService.wsdl
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://apache.org/cxf/databinding/sdo/hello_world_soap_http" xmlns:x1="http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWorld" targetNamespace="http://apache.org/cxf/databinding/sdo/hello_world_soap_http">
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types" targetNamespace="http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types" elementFormDefault="qualified">
- <simpleType name="MyStringType">
- <restriction base="string">
- <maxLength value="30"/>
- </restriction>
- </simpleType>
- <complexType name="Structure">
- <sequence>
- <element name="text" type="string"/>
- <element name="int" type="int"/>
- <element name="dbl" type="double"/>
- <element name="texts" type="string" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- <element name="echoStruct">
- <complexType>
- <sequence>
- <element name="struct" type="tns:Structure"/>
- </sequence>
- </complexType>
- </element>
- <element name="echoStructResponse">
- <complexType>
- <sequence>
- <element name="return" type="tns:Structure"/>
- </sequence>
- </complexType>
- </element>
- <element name="sayHi">
- <complexType/>
- </element>
- <element name="sayHiResponse">
- <complexType>
- <sequence>
- <element name="responseType" type="string"/>
- </sequence>
- </complexType>
- </element>
- <element name="greetMe">
- <complexType>
- <sequence>
- <element name="requestType" type="tns:MyStringType"/>
- </sequence>
- </complexType>
- </element>
- <element name="greetMeResponse">
- <complexType>
- <sequence>
- <element name="responseType" type="string"/>
- </sequence>
- </complexType>
- </element>
- <element name="greetMeOneWay">
- <complexType>
- <sequence>
- <element name="requestType" type="string"/>
- </sequence>
- </complexType>
- </element>
- <element name="pingMe">
- <complexType/>
- </element>
- <element name="pingMeResponse">
- <complexType/>
- </element>
- <element name="faultDetail">
- <complexType>
- <sequence>
- <element name="minor" type="short"/>
- <element name="major" type="short"/>
- </sequence>
- </complexType>
- </element>
- </schema>
- </wsdl:types>
- <wsdl:message name="sayHiRequest">
- <wsdl:part element="x1:sayHi" name="in"/>
- </wsdl:message>
- <wsdl:message name="sayHiResponse">
- <wsdl:part element="x1:sayHiResponse" name="out"/>
- </wsdl:message>
- <wsdl:message name="greetMeRequest">
- <wsdl:part element="x1:greetMe" name="in"/>
- </wsdl:message>
- <wsdl:message name="greetMeResponse">
- <wsdl:part element="x1:greetMeResponse" name="out"/>
- </wsdl:message>
- <wsdl:message name="echoStructRequest">
- <wsdl:part element="x1:echoStruct" name="in"/>
- </wsdl:message>
- <wsdl:message name="echoStructResponse">
- <wsdl:part element="x1:echoStructResponse" name="out"/>
- </wsdl:message>
- <wsdl:message name="greetMeOneWayRequest">
- <wsdl:part element="x1:greetMeOneWay" name="in"/>
- </wsdl:message>
- <wsdl:message name="pingMeRequest">
- <wsdl:part name="in" element="x1:pingMe"/>
- </wsdl:message>
- <wsdl:message name="pingMeResponse">
- <wsdl:part name="out" element="x1:pingMeResponse"/>
- </wsdl:message>
- <wsdl:message name="pingMeFault">
- <wsdl:part name="faultDetail" element="x1:faultDetail"/>
- </wsdl:message>
- <wsdl:portType name="Greeter">
- <wsdl:operation name="sayHi">
- <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
- <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
- </wsdl:operation>
- <wsdl:operation name="greetMe">
- <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
- <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
- </wsdl:operation>
- <wsdl:operation name="echoStruct">
- <wsdl:input message="tns:echoStructRequest" name="echoStructRequest"/>
- <wsdl:output message="tns:echoStructResponse" name="echoStructResponse"/>
- </wsdl:operation>
- <wsdl:operation name="greetMeOneWay">
- <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
- </wsdl:operation>
- <wsdl:operation name="pingMe">
- <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
- <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
- <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="sayHi">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="sayHiRequest">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="sayHiResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="greetMe">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="greetMeRequest">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="greetMeResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="echoStruct">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="echoStructRequest">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="echoStructResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="greetMeOneWay">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="greetMeOneWayRequest">
- <soap:body use="literal"/>
- </wsdl:input>
- </wsdl:operation>
- <wsdl:operation name="pingMe">
- <soap:operation style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- <wsdl:fault name="pingMeFault">
- <soap:fault name="pingMeFault" use="literal"/>
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
-</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl b/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl
deleted file mode 100644
index 4db33a1..0000000
--- a/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_dynamic.wsdl
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://apache.org/cxf/databinding/sdo/hello_world_soap_http" xmlns:x1="http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWorld" targetNamespace="http://apache.org/cxf/databinding/sdo/hello_world_soap_http">
- <wsdl:import location="HelloService.wsdl" namespace="http://apache.org/cxf/databinding/sdo/hello_world_soap_http"/>
- <wsdl:service name="SOAPService">
- <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
- <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl
----------------------------------------------------------------------
diff --git a/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl b/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl
deleted file mode 100644
index 4db33a1..0000000
--- a/rt/databinding/sdo/src/test/resources/wsdl_sdo/HelloService_static.wsdl
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
- -->
-<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://apache.org/cxf/databinding/sdo/hello_world_soap_http" xmlns:x1="http://apache.org/cxf/databinding/sdo/hello_world_soap_http/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWorld" targetNamespace="http://apache.org/cxf/databinding/sdo/hello_world_soap_http">
- <wsdl:import location="HelloService.wsdl" namespace="http://apache.org/cxf/databinding/sdo/hello_world_soap_http"/>
- <wsdl:service name="SOAPService">
- <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
- <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/pom.xml
----------------------------------------------------------------------
diff --git a/systests/jaxrs/pom.xml b/systests/jaxrs/pom.xml
index 829c04f..7c4e6e7 100644
--- a/systests/jaxrs/pom.xml
+++ b/systests/jaxrs/pom.xml
@@ -306,12 +306,6 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-databinding-sdo</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>${project.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/cxf/blob/969a10c9/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
index 2f4708f..fc85208 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
@@ -21,13 +21,9 @@ package org.apache.cxf.systest.jaxrs;
import java.util.Collections;
-import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.jaxrs.model.AbstractResourceInfo;
import org.apache.cxf.jaxrs.provider.aegis.AegisElementProvider;
-import org.apache.cxf.sdo.SDODataBinding;
-import org.apache.cxf.systest.jaxrs.sdo.SDOResource;
-import org.apache.cxf.systest.jaxrs.sdo.Structure;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.BeforeClass;
@@ -64,27 +60,6 @@ public class JAXRSDataBindingTest extends AbstractBusClientServerTestBase {
assertEquals("CXF in Action", book.getName());
}
- @Test
- public void testSDOStructure() throws Exception {
- doTestSDOStructure("http://localhost:" + PORT + "/databinding/sdo");
- }
-
- @Test
- public void testSDOStructureWithAnnotation() throws Exception {
- doTestSDOStructure("http://localhost:" + PORT + "/databinding/sdo2");
- }
-
- private void doTestSDOStructure(String address) throws Exception {
- JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
- bean.setDataBinding(new SDODataBinding());
- bean.setAddress(address);
- bean.setResourceClass(SDOResource.class);
- SDOResource client = bean.create(SDOResource.class);
- Structure struct = client.getStructure();
- assertEquals("sdo", struct.getText());
- assertEquals(123.5, struct.getDbl(), 0.01);
- assertEquals(3, struct.getInt());
- }
-
+
}