You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ve...@apache.org on 2009/06/25 22:00:55 UTC
svn commit: r788496 - in /webservices/axis2/trunk/java/modules/adb-codegen:
./ test-resources/testsuite/unqualified/
test/org/apache/axis2/schema/unqualified/
Author: veithen
Date: Thu Jun 25 20:00:55 2009
New Revision: 788496
URL: http://svn.apache.org/viewvc?rev=788496&view=rev
Log:
Added regression test for AXIS2-4374.
Added:
webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/
webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/company.xsd (with props)
webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyflow.xsd (with props)
webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd (with props)
webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companytype.xsd (with props)
Modified:
webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml
webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/unqualified/UnqualifiedTest.java
Modified: webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml?rev=788496&r1=788495&r2=788496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml Thu Jun 25 20:00:55 2009
@@ -82,6 +82,7 @@
<arg file="${testsuite.source.dir}/chameleon.xsd"/>
<arg file="${testsuite.source.dir}/nonamespace.xsd"/> <!-- compile only; no tests -->
<arg file="${testsuite.source.dir}/unqualified.xsd"/>
+ <arg file="${testsuite.source.dir}/unqualified/companyservice.xsd"/>
<arg file="${schema.generated.src.dir}"/>
</java>
<java classname="org.apache.axis2.schema.XSD2Java" fork="true">
Added: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/company.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/company.xsd?rev=788496&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/company.xsd (added)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/company.xsd Thu Jun 25 20:00:55 2009
@@ -0,0 +1,31 @@
+<?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.
+ -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://apache.org/axis2/schema/unqualified/company"
+ xmlns:tns="http://apache.org/axis2/schema/unqualified/company"
+ xmlns:comType="http://apache.org/axis2/schema/unqualified/companyType"
+ elementFormDefault="unqualified">
+
+ <xs:import namespace="http://apache.org/axis2/schema/unqualified/companyType" schemaLocation="companytype.xsd"/>
+
+ <xs:element name="companyId" type="comType:String_Type"/>
+ <xs:element name="userId" type="comType:String_Type"/>
+ <xs:element name="address" type="comType:address_type"/>
+</xs:schema>
\ No newline at end of file
Propchange: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/company.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Added: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyflow.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyflow.xsd?rev=788496&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyflow.xsd (added)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyflow.xsd Thu Jun 25 20:00:55 2009
@@ -0,0 +1,41 @@
+<?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.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://apache.org/axis2/schema/unqualified/companyFlow"
+ xmlns:tns="http://apache.org/axis2/schema/unqualified/companyFlow"
+ elementFormDefault="unqualified"
+ xmlns:com="http://apache.org/axis2/schema/unqualified/company">
+
+ <import namespace="http://apache.org/axis2/schema/unqualified/company" schemaLocation="company.xsd"/>
+
+ <complexType name="companyRequest">
+ <sequence>
+ <element ref="com:companyId"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="companyResponse">
+ <sequence>
+ <element ref="com:companyId" minOccurs="0"/>
+ <element ref="com:userId"/>
+ <element ref="com:address"/>
+ </sequence>
+ </complexType>
+</schema>
Propchange: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyflow.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Added: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd?rev=788496&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd (added)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd Thu Jun 25 20:00:55 2009
@@ -0,0 +1,41 @@
+<?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.
+ -->
+<xsd:schema targetNamespace="http://apache.org/axis2/schema/unqualified/companyService"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:compflow="http://apache.org/axis2/schema/unqualified/companyFlow">
+
+ <xsd:import namespace="http://apache.org/axis2/schema/unqualified/companyFlow" schemaLocation="companyflow.xsd" />
+
+ <xsd:element name="getCompanyDetailsRequest">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="in" type="compflow:companyRequest" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getCompanyDetailsResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="out" type="compflow:companyResponse" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
Propchange: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Added: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companytype.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companytype.xsd?rev=788496&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companytype.xsd (added)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companytype.xsd Thu Jun 25 20:00:55 2009
@@ -0,0 +1,41 @@
+<?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.
+ -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://apache.org/axis2/schema/unqualified/companyType"
+ xmlns:tns="http://apache.org/axis2/schema/unqualified/companyType"
+ elementFormDefault="unqualified">
+
+ <xs:complexType name="address_type">
+ <xs:sequence>
+ <xs:element name="address1" type="tns:String_Type" minOccurs="0"/>
+ <xs:element name="address2" type="tns:String_Type" minOccurs="0"/>
+ <xs:element name="address3" type="tns:String_Type" minOccurs="0"/>
+ <xs:element name="address4" type="tns:String_Type" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="String_Type">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="isUpdated" type="xs:boolean" default="false"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Propchange: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/unqualified/companytype.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/unqualified/UnqualifiedTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/unqualified/UnqualifiedTest.java?rev=788496&r1=788495&r2=788496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/unqualified/UnqualifiedTest.java (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/unqualified/UnqualifiedTest.java Thu Jun 25 20:00:55 2009
@@ -20,12 +20,45 @@
package org.apache.axis2.schema.unqualified;
import org.apache.axis2.schema.AbstractTestCase;
+import org.apache.axis2.schema.unqualified.companyflow.CompanyResponse;
+import org.apache.axis2.schema.unqualified.companyservice.GetCompanyDetailsResponse;
+import org.apache.axis2.schema.unqualified.companytype.Address_type;
+import org.apache.axis2.schema.unqualified.companytype.String_Type;
public class UnqualifiedTest extends AbstractTestCase {
- public void test() throws Exception {
+ public void testTestElement() throws Exception {
TestElement testElement = new TestElement();
testElement.setElement1("element1");
testElement.setElement2("element2");
testSerializeDeserialize(testElement);
}
+
+ /**
+ * Regression test for AXIS2-4374.
+ *
+ * @throws Exception
+ */
+ public void testGetCompanyDetailsResponse() throws Exception {
+ String_Type companyId = new String_Type();
+ companyId.setString("112233");
+
+ String_Type userId = new String_Type();
+ userId.setString("user");
+
+ String_Type address1 = new String_Type();
+ address1.setString("Fenchurch street");
+
+ Address_type address = new Address_type();
+ address.setAddress1(address1);
+
+ CompanyResponse company = new CompanyResponse();
+ company.setCompanyId(companyId);
+ company.setUserId(userId);
+ company.setAddress(address);
+
+ GetCompanyDetailsResponse response = new GetCompanyDetailsResponse();
+ response.setOut(company);
+
+ testSerializeDeserialize(response);
+ }
}