incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r487225 [2/2] - in /incubator/yoko/trunk: ./ bindings/ bindings/src/test/java/org/apache/yoko/bindings/corba/ bindings/src/test/resources/wsdl/type_test/ tools/src/main/java/org/apache/yoko/tools/processors/wsdl/
Date Thu, 14 Dec 2006 15:01:36 GMT
Added: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd?view=auto&rev=487225
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd Thu Dec 14 07:01:35 2006
@@ -0,0 +1,100 @@
+<?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"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:itst="http://tests.iona.com/ittests"
+    xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext"
+    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+    xmlns:x1="http://apache.org/type_test/types1"
+    xmlns:x2="http://apache.org/type_test/types2"
+    xmlns:x3="http://apache.org/type_test/types3"
+    elementFormDefault="qualified">
+
+    <!-- For each type and element defined in this schema, the
+	 type_test_wsdl stylesheet will generate a set of test
+	 elements, test messages and an operation on the test port type.
+	 -->
+
+    <!-- itst:builtIn are not schema elements, they are directives for
+	 our stylesheet to generate code for built-in types.
+	 -->
+
+    <!-- The schema elements are organized in several groups enclosed
+         withing itst:it_test_group elements. Each group will be copied
+         into its own xsd file, named after the value of the ID attribute
+         of the group. Schema elements from groups with no ID attribute will
+         appear directly inside type_test.wsdl. Elements from groups with
+         an ID will appear in type_test_1.xsd, type_test_2.xsd, ..., type_test_<n>.xsd
+         -->
+
+    <!-- Add a itst:it_no_test="true" attribute for any xsd type or
+         element that does not need to be tested directly (ie: part
+         of a recursion chain, or base type to be reused by several
+         types.
+         -->
+
+<itst:it_test_group>
+         
+    <itst:builtIn name="byte"          byValue="true" javaType="byte"    javaHolder="java.lang.Byte"/>
+    <itst:builtIn name="short"         byValue="true" javaType="short"   javaHolder="java.lang.Short"/>
+    <itst:builtIn name="int"           byValue="true" javaType="int"     javaHolder="java.lang.Integer"/>
+    <itst:builtIn name="long"          byValue="true" javaType="long"    javaHolder="java.lang.Long"/>
+    <itst:builtIn name="unsignedShort" byValue="true" javaType="int"     javaHolder="java.lang.Integer"/>
+    <itst:builtIn name="unsignedInt"   byValue="true" javaType="long"    javaHolder="java.lang.Long"/>
+    <itst:builtIn name="unsignedLong"  byValue="true" javaType="java.math.BigInteger" javaHolder="java.math.BigInteger"/>
+    <itst:builtIn name="float"         byValue="true" javaType="float"   javaHolder="java.lang.Float"/>
+    <itst:builtIn name="double"        byValue="true" javaType="double"  javaHolder="java.lang.Double"/>
+    <itst:builtIn name="unsignedByte"  byValue="true" javaType="short"   javaHolder="java.lang.Short"/>
+    <itst:builtIn name="boolean"       byValue="true" javaType="boolean" javaHolder="java.lang.Boolean"/>
+    <itst:builtIn name="string"                       javaType="String"  javaHolder="java.lang.String"/>
+    <itst:builtIn name="QName"                        javaType="javax.xml.namespace.QName" javaHolder="javax.xml.namespace.QName"/>
+
+    <itst:builtIn name="integer"                      javaType="java.math.BigInteger" javaHolder="java.math.BigInteger"/>
+    <itst:builtIn name="positiveInteger"              javaType="java.math.BigInteger" javaHolder="java.math.BigInteger"/>
+    <itst:builtIn name="nonPositiveInteger"           javaType="java.math.BigInteger" javaHolder="java.math.BigInteger"/>
+    <itst:builtIn name="negativeInteger"              javaType="java.math.BigInteger" javaHolder="java.math.BigInteger"/>
+    <itst:builtIn name="nonNegativeInteger"           javaType="java.math.BigInteger" javaHolder="java.math.BigInteger"/>
+    <itst:builtIn name="decimal"                      javaType="java.math.BigDecimal" javaHolder="java.math.BigDecimal"/>
+    
+    <itst:builtIn name="date"                         javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="dateTime"                     javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="time"                         javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="gYear"                        javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="gYearMonth"                   javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="gMonth"                       javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="gMonthDay"                    javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="gDay"                         javaType="javax.xml.datatype.XMLGregorianCalendar" javaHolder="javax.xml.datatype.XMLGregorianCalendar"/>
+    <itst:builtIn name="duration" javaType="javax.xml.datatype.Duration" javaHolder="javax.xml.datatype.Duration"/>
+    <itst:builtIn name="anyURI"   javaType="java.lang.String" javaHolder="java.lang.String"/>
+    <itst:builtIn name="normalizedString"             javaType="java.lang.String"             javaHolder="java.lang.String"/>
+    <itst:builtIn name="token"                        javaType="java.lang.String"             javaHolder="java.lang.String"/>
+    <itst:builtIn name="language"                     javaType="java.lang.String"             javaHolder="java.lang.String"/>
+    <itst:builtIn name="NMTOKEN"                      javaType="java.lang.String"             javaHolder="java.lang.String"/>
+    <itst:builtIn name="NMTOKENS"                     javaType="java.util.List&#x3c;java.lang.String&#x3e;" javaHolder="java.util.List&#x3c;java.lang.String&#x3e;"/>
+    <itst:builtIn name="Name"                         javaType="java.lang.String"             javaHolder="java.lang.String"/>
+    <itst:builtIn name="NCName"                       javaType="java.lang.String"             javaHolder="java.lang.String"/>
+    <itst:builtIn name="ID"                           javaType="java.lang.String"             javaHolder="java.lang.String"/>
+    <itst:builtIn name="base64Binary"  javaType="byte[]" javaHolder="byte[]"/>
+    <itst:builtIn name="hexBinary"     javaType="byte[]" javaHolder="byte[]"/>
+
+  </itst:it_test_group>
+</schema>
+

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_ID_xsd.xsl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_ID_xsd.xsl?view=auto&rev=487225
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_ID_xsd.xsl (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_ID_xsd.xsl Thu Dec 14 07:01:35 2006
@@ -0,0 +1,78 @@
+<?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.
+-->
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext"
+    xmlns:itst="http://tests.iona.com/ittests"
+    xmlns:x1="http://apache.org/type_test/types1"
+    xmlns:x2="http://apache.org/type_test/types2"
+    xmlns:x3="http://apache.org/type_test/types3"
+    xmlns="http://www.w3.org/2001/XMLSchema"
+    >
+
+  <xsl:output method="xml" indent="yes" xalan:indent-amount="4"/>
+  <xsl:strip-space elements="*"/>
+
+  <!-- group selection parameter -->  
+  <xsl:param name="groupID"/>
+
+  <!-- copy attributes from any node -->
+  <xsl:template match="@*" mode="attribute_copy">
+    <xsl:attribute name="{name(.)}">
+      <xsl:value-of select="."/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <!-- 0 - root schema node -->
+  <xsl:template match="/xsd:schema">
+    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+                xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+                jaxb:version="2.0">
+      <xsl:attribute name="targetNamespace">
+        <xsl:value-of select="concat('http://apache.org/type_test/types', $groupID)"/>
+      </xsl:attribute>
+      <xsl:apply-templates select="@*" mode="attribute_copy"/>
+      <xsl:apply-templates select="itst:it_test_group[@ID=$groupID]" mode="test_group"/>
+    </xsd:schema>
+  </xsl:template>
+
+  <!-- 0.1 group of types -->
+  <xsl:template match="itst:it_test_group" mode="test_group">
+    <xsl:apply-templates select="xsd:attribute" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:attributeGroup" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:group" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:element" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:simpleType" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:complexType" mode="schema_type"/>
+  </xsl:template>
+  
+  <!-- 0.1.1 - schema type or construct -->
+  <xsl:template match="itst:it_test_group/*" mode="schema_type">
+      <xsl:element name="{name(.)}">
+        <!-- drop "it_no_test" from the attributes -->
+        <xsl:apply-templates select="@*[name()!='itst:it_no_test']" mode="attribute_copy"/>
+        <xsl:copy-of select="*"/>
+      </xsl:element>
+  </xsl:template>
+
+</xsl:stylesheet>
+

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_ID_xsd.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_ID_xsd.xsl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_ID_xsd.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_impl_java.xsl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_impl_java.xsl?view=auto&rev=487225
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_impl_java.xsl (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_impl_java.xsl Thu Dec 14 07:01:35 2006
@@ -0,0 +1,435 @@
+<!--
+  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.
+-->
+<!--
+     Stylesheet to convert schema into java file for test implementation.
+-->
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    xmlns:itst="http://tests.iona.com/ittests">
+    
+    <xsl:import href="inc_type_test_java_signature.xsl"/>
+    
+    <xsl:output method="text"/>
+    <xsl:strip-space elements="*"/>
+    
+    <xsl:template match="/xsd:schema">
+      <xsl:text>package org.apache.type_test.corba;&#10;&#10;</xsl:text>
+      <xsl:text>import java.util.List;&#10;</xsl:text>
+      <xsl:text>import javax.xml.ws.Holder;&#10;&#10;</xsl:text>
+      <xsl:apply-templates select="itst:it_test_group[@ID]" mode="imports"/>
+<![CDATA[/**
+ * org.apache.type_test.corba.TypeTestImpl
+ */
+public class TypeTestImpl {
+
+    public void testVoid() {
+    }
+    
+    public void testOneway(String x, String y) {
+    }
+    /*
+    public org.apache.type_test.corba.types1.AnonTypeElement testAnonTypeElement(
+            org.apache.type_test.corba.types1.AnonTypeElement x, 
+            Holder<org.apache.type_test.corba.types1.AnonTypeElement> y, 
+            Holder<org.apache.type_test.corba.types1.AnonTypeElement> z) {
+        z.value.setVarFloat(y.value.getVarFloat());
+        z.value.setVarInt(y.value.getVarInt());
+        z.value.setVarString(y.value.getVarString());
+
+        y.value.setVarFloat(x.getVarFloat());
+        y.value.setVarInt(x.getVarInt());
+        y.value.setVarString(x.getVarString());
+
+        org.apache.type_test.corba.types1.AnonTypeElement varReturn =
+            new org.apache.type_test.corba.types1.AnonTypeElement();
+        varReturn.setVarFloat(x.getVarFloat());
+        varReturn.setVarInt(x.getVarInt());
+        varReturn.setVarString(x.getVarString());
+        return varReturn;
+    }
+    
+    public String testNillableString(String x,
+            Holder<String> y,
+            Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public SimpleStruct testNillableStruct(
+            SimpleStruct x,
+            Holder<SimpleStruct> y,
+            Holder<SimpleStruct> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+   
+    public String testSimpleRestriction(String x, 
+            Holder<String> y, 
+            Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String testSimpleRestriction2(String x, 
+            Holder<String> y, 
+            Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String testSimpleRestriction3(String x, 
+            Holder<String> y, 
+            Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String testSimpleRestriction4(String x, 
+            Holder<String> y, 
+            Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String testSimpleRestriction5(String x, 
+            Holder<String> y, 
+            Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String testSimpleRestriction6(String x, 
+            Holder<String> y, 
+            Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String testAnyURIRestriction(String x, Holder<String> y, Holder<String> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public byte[] testHexBinaryRestriction(byte[] x,
+            Holder<byte[]> y, 
+            Holder<byte[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public byte[] testBase64BinaryRestriction(byte[] x, 
+            Holder<byte[]> y, 
+            Holder<byte[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public List<String> testSimpleListRestriction2(List<String> x,
+            Holder< List<String> > y,
+            Holder< List<String> > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+    
+    public String[] testSimpleListRestriction2(String[] x,
+            Holder<String[]> y, 
+            Holder<String[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public List<String> testStringList(List<String> x,
+            Holder< List<String> > y,
+            Holder< List<String> > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+    
+    public String[] testStringList(String[] x,
+            Holder<String[]> y,
+            Holder<String[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+    
+    public List<java.lang.Integer> testNumberList(List<java.lang.Integer> x,
+            Holder< List<java.lang.Integer> > y,
+            Holder< List<java.lang.Integer> > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public java.lang.Integer[] testNumberList(java.lang.Integer[] x,
+            Holder<java.lang.Integer[]> y,
+            Holder<java.lang.Integer[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public List<javax.xml.namespace.QName> testQNameList(
+            List<javax.xml.namespace.QName> x,
+            Holder< List<javax.xml.namespace.QName> > y,
+            Holder< List<javax.xml.namespace.QName> > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+    
+    public javax.xml.namespace.QName[] testQNameList(
+            javax.xml.namespace.QName[] x,
+            Holder<javax.xml.namespace.QName[]> y,
+            Holder<javax.xml.namespace.QName[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+    
+    public ShortEnum[] testShortEnumList(ShortEnum[] x,
+            Holder<ShortEnum[]> y,
+            Holder<ShortEnum[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public List<java.lang.Short> testAnonEnumList(
+            List<java.lang.Short> x,
+            Holder< List<java.lang.Short> > y,
+            Holder< List<java.lang.Short> > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public java.lang.Short[] testAnonEnumList(java.lang.Short[] x,
+            Holder<java.lang.Short[]> y,
+            Holder<java.lang.Short[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String[] testSimpleUnionList(String[] x,
+            Holder<String[]> y,
+            Holder<String[]> z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+ 
+    public String[] testAnonUnionList(String[] x,
+            Holder< String[] > y,
+            Holder< String[] > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+    */
+    public String[] testNMTOKENS(
+            String[] x,
+            Holder<String[]> y,
+            Holder<String[]> z) {    
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public java.lang.String testID(
+            java.lang.String x,
+            Holder<java.lang.String> y,
+            Holder<java.lang.String> z) {    
+        z.value = y.value;
+        y.value = x;
+        return x + y.value;
+    }
+    /*
+    public IDTypeAttribute testIDTypeAttribute(
+            IDTypeAttribute x,
+            Holder<IDTypeAttribute> y,
+            Holder<IDTypeAttribute> z) {    
+        z.value = y.value;
+        y.value = x;
+        IDTypeAttribute varReturn = new IDTypeAttribute();
+        varReturn.setId(x.getId() + y.value.getId());
+        return varReturn;
+    }
+
+    public String[] testUnionWithAnonList(String[] x,
+            Holder< String[] > y,
+            Holder< String[] > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String[] testUnionWithStringList(String[] x,
+            Holder< String[] > y,
+            Holder< String[] > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String[] testUnionWithStringListRestriction(String[] x,
+            Holder< String[] > y,
+            Holder< String[] > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String[] testUnionWithAnonUnion(String[] x,
+            Holder< String[] > y,
+            Holder< String[] > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String[] testUnionWithUnion(String[] x,
+            Holder< String[] > y,
+            Holder< String[] > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+
+    public String[] testUnionWithUnionRestriction(String[] x,
+            Holder< String[] > y,
+            Holder< String[] > z) {
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }
+    */
+]]>
+      <xsl:apply-templates select="." mode="definitions"/>
+<![CDATA[}]]>
+    </xsl:template>
+
+    <xsl:template match="itst:it_test_group" mode="imports">
+        <xsl:apply-templates select="xsd:simpleType[not(
+                @name='StringList'
+                or @name='NumberList'
+                or @name='QNameList'
+                or @name='ShortEnumList'
+                or @name='AnonEnumList'
+                or @name='SimpleRestriction'
+                or @name='SimpleRestriction2'
+                or @name='SimpleRestriction3'
+                or @name='SimpleRestriction4'
+                or @name='SimpleRestriction5'
+                or @name='SimpleRestriction6'
+                or @name='AnyURIRestriction'
+                or @name='HexBinaryRestriction'
+                or @name='Base64BinaryRestriction'
+                or @name='SimpleListRestriction2'
+                or contains(@name, 'Union')
+                or @itst:it_no_test='true')]"
+                mode="import">
+            <!--
+                or @name='SimpleUnionList'
+                or @name='AnonUnionList'
+            -->
+            <xsl:sort select="@name"/>
+            <xsl:with-param name="id" select="@ID"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="xsd:complexType[not(
+                @itst:it_no_test='true')]"
+                mode="import">
+            <xsl:with-param name="id" select="@ID"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="itst:it_test_group/*" mode="import">
+        <xsl:param name="id"/>
+        <xsl:value-of select="concat('import org.apache.type_test.corba.types',
+            $id, '.', @name, ';&#10;')"/>
+    </xsl:template>
+
+    <xsl:template match="itst:it_test_group" mode="definitions">
+        <xsl:apply-templates select="xsd:simpleType[not(
+                @name='StringList'
+                or @name='NumberList'
+                or @name='QNameList'
+                or @name='ShortEnumList'
+                or @name='AnonEnumList'
+                or @name='SimpleRestriction'
+                or @name='SimpleRestriction2'
+                or @name='SimpleRestriction3'
+                or @name='SimpleRestriction4'
+                or @name='SimpleRestriction5'
+                or @name='SimpleRestriction6'
+                or @name='AnyURIRestriction'
+                or @name='HexBinaryRestriction'
+                or @name='Base64BinaryRestriction'
+                or @name='SimpleListRestriction2'
+                or @itst:it_no_test='true')]"
+            mode="definition"/>
+            <!--
+                or @name='SimpleUnionList'
+                or @name='AnonUnionList'
+            -->
+        <xsl:apply-templates select="xsd:complexType[not(
+                @name='IDTypeAttribute'
+                or @itst:it_no_test='true')]"
+            mode="definition"/>
+        <!--
+        <xsl:apply-templates select="xsd:element[not(
+                @name='AnonTypeElement'
+                or @name='NillableString'
+                or @name='NillableStruct'
+                or @itst:it_no_test='true')]"
+            mode="definition"/>
+        -->
+        <xsl:apply-templates select="itst:builtIn[not(
+                @name='ID'
+                or @itst:it_no_test='true')]"
+            mode="definition"/>
+    </xsl:template>
+
+    <xsl:template match="itst:it_test_group/*" mode="definition">
+        <xsl:apply-templates select="." mode="test_signature"/>
+    <xsl:text> {    
+        z.value = y.value;
+        y.value = x;
+        return x;
+    }&#10;</xsl:text>
+    </xsl:template>
+
+</xsl:stylesheet>

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_impl_java.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_impl_java.xsl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_impl_java.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_tester_java.xsl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_tester_java.xsl?view=auto&rev=487225
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_tester_java.xsl (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_tester_java.xsl Thu Dec 14 07:01:35 2006
@@ -0,0 +1,82 @@
+<!--
+  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.
+-->
+<!--
+     Stylesheet to convert schema into java file for test implementation.
+-->
+<xsl:stylesheet
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:xalan="http://xml.apache.org/xslt"
+        xmlns:itst="http://tests.iona.com/ittests">
+
+    <xsl:output method="text"/>
+    <xsl:strip-space elements="*"/>
+
+    <xsl:template match="/xsd:schema">
+<![CDATA[
+package org.apache.type_test.corba;
+
+/**
+ * org.apache.type_test.corba.TypeTestTester
+ */
+public interface TypeTestTester {
+
+    void setPerformanceTestOnly();
+    
+    void testVoid() throws Exception;
+    
+    void testOneway() throws Exception;]]>
+        <xsl:apply-templates mode="definitions"/>
+        <![CDATA[
+}]]>
+    </xsl:template>
+
+    <xsl:template match="itst:it_test_group" mode="definitions">
+        <xsl:apply-templates select="xsd:simpleType[not(
+                @name='SimpleUnionList'
+                or @name='AnonUnionList'
+                or @name='SimpleUnion'
+                or @itst:it_no_test='true')]"
+            mode="definition"/>
+        <xsl:apply-templates select="xsd:complexType[not(
+                @itst:it_no_test='true')]"
+            mode="definition"/>
+        <!--
+        <xsl:apply-templates select="xsd:element[not(
+                @itst:it_no_test='true')]"
+            mode="definition"/>
+        -->
+        <xsl:apply-templates select="itst:builtIn[not(
+                @itst:it_no_test='true')]"
+            mode="definition"/>
+    </xsl:template>
+
+    <xsl:template match="itst:it_test_group/*" mode="definition">
+        <xsl:text>
+    void test</xsl:text>
+        <xsl:value-of select="concat(translate(substring(@name, 1, 1),
+                                     'abcdefghijklmnopqrstuvwxyz', 
+                                     'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+                                     substring(@name, 2))"/>
+        <xsl:text>() throws Exception;</xsl:text>
+        <xsl:text>
+        </xsl:text>
+    </xsl:template>
+
+</xsl:stylesheet>

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_tester_java.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_tester_java.xsl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_tester_java.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl.xsl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl.xsl?view=auto&rev=487225
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl.xsl (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl.xsl Thu Dec 14 07:01:35 2006
@@ -0,0 +1,507 @@
+<?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.
+-->
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext"
+    xmlns:itst="http://tests.iona.com/ittests">
+
+  <xsl:output method="xml" indent="yes" xalan:indent-amount="4"/>
+  <xsl:strip-space elements="*"/>
+
+  <!-- Parameter: Path to the generated XSDs to include -->
+  <xsl:param name="inc_xsd_path"/>
+  
+  <!-- Parameter: Use document-literal 'document' or rpc-literal 'rpc' style -->
+  <xsl:param name="use_style"/>
+ 
+  <!-- Parameter: Target name space suffix -->
+  <xsl:param name="tns_suffix"/>
+ 
+  <!-- copy attributes from any node -->
+  <xsl:template match="@*" mode="attribute_copy">
+    <xsl:attribute name="{name(.)}">
+      <xsl:value-of select="."/> 
+    </xsl:attribute>
+  </xsl:template>
+
+  <!-- 0 - root schema node -->
+  <xsl:template match="/xsd:schema">
+    <xsl:if test="$tns_suffix='doc'">
+      <definitions
+          xmlns="http://schemas.xmlsoap.org/wsdl/"
+          xmlns:tns="http://apache.org/type_test/doc"
+          targetNamespace="http://apache.org/type_test/doc"
+          name="type_test">
+        <xsl:apply-templates select="@*[name(.)!='elementFormDefault']" mode="attribute_copy"/>
+        <xsl:apply-templates select="." mode="schema"/>
+        <xsl:apply-templates select="." mode="test_messages"/>
+        <xsl:apply-templates select="." mode="test_portType"/>
+      </definitions>
+    </xsl:if>
+    <xsl:if test="$tns_suffix='rpc'">
+      <definitions
+          xmlns="http://schemas.xmlsoap.org/wsdl/"
+          xmlns:x1="http://apache.org/type_test/types1"
+          xmlns:x2="http://apache.org/type_test/types2"
+          xmlns:x3="http://apache.org/type_test/types3"
+          xmlns:tns="http://apache.org/type_test/rpc"
+          targetNamespace="http://apache.org/type_test/rpc"
+          name="type_test">
+        <xsl:apply-templates select="@*[name(.)!='elementFormDefault']" mode="attribute_copy"/>
+        <xsl:apply-templates select="." mode="schema"/>
+        <xsl:apply-templates select="." mode="test_messages"/>
+        <xsl:apply-templates select="." mode="test_portType"/>
+      </definitions>
+    </xsl:if>
+    <xsl:if test="$tns_suffix='corba'">
+      <definitions
+          xmlns="http://schemas.xmlsoap.org/wsdl/"
+          xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" 
+          xmlns:tns="http://apache.org/type_test/corba"
+          targetNamespace="http://apache.org/type_test/corba"
+          name="type_test">
+        <xsl:apply-templates select="@*[name(.)!='elementFormDefault']" mode="attribute_copy"/>
+        <xsl:apply-templates select="." mode="schema"/>
+        <xsl:apply-templates select="." mode="test_messages"/>
+        <xsl:apply-templates select="." mode="test_portType"/>
+      </definitions>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- 1 - schema -->
+  <xsl:template match="/xsd:schema" mode="schema"
+        xmlns="http://schemas.xmlsoap.org/wsdl/">
+    <types>
+      <xsd:schema xmlns:iona="iona.iona"
+                  xmlns="http://www.w3.org/2001/XMLSchema"
+                  xmlns:x1="http://apache.org/type_test/types1"
+                  xmlns:x2="http://apache.org/type_test/types2"
+                  xmlns:x3="http://apache.org/type_test/types3"
+                  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+                  jaxb:version="2.0">
+        <xsl:attribute name="targetNamespace">
+          <xsl:if test="$tns_suffix='doc'">
+            <xsl:value-of select="'http://apache.org/type_test/doc'"/>
+          </xsl:if>
+          <xsl:if test="$tns_suffix='rpc'">
+            <xsl:value-of select="'http://apache.org/type_test/rpc'"/>
+          </xsl:if>
+          <xsl:if test="$tns_suffix='corba'">
+            <xsl:value-of select="'http://apache.org/type_test/corba'"/>
+          </xsl:if>
+        </xsl:attribute>
+        <!-- 
+        <xsd:annotation>
+          <xsd:appinfo>
+            <jaxb:globalBindings localScoping="nested">
+        -->
+              <!-- typesafeEnumBase="xsd:string xsd:byte xsd:short xsd:int xsd:long xsd:unsignedShort xsd:unsignedInt xsd:unsignedLong xsd:float xsd:double xsd:unsignedByte xsd:boolean xsd:integer xsd:positiveInteger xsd:nonPositiveInteger xsd:negativeInteger xsd:nonNegativeInteger xsd:decimal xsd:anyURI xsd:normalizedString xsd:token xsd:language xsd:NMTOKEN xsd:Name xsd:NCName" -->
+              <!-- generateIsSetMethod="true" -->
+              <!-- optionalProperty="isSet" -->
+              <!-- jaxb:javaType name="java.net.URI" xmlType="xsd:anyURI" parseMethod="" printMethod=""/ -->
+        <!-- 
+            </jaxb:globalBindings>
+          </xsd:appinfo>
+        </xsd:annotation>
+        -->
+        <xsl:apply-templates select="@*" mode="attribute_copy"/>
+        <xsl:apply-templates select="itst:it_test_group[@ID]" mode="schema_import"/>
+        <xsl:apply-templates select="itst:it_test_group[not(@ID)]" mode="hardcoded_types"/>
+        <xsl:apply-templates select="itst:it_test_group" mode="test_elements"/>
+        <xsl:apply-templates select="itst:it_test_group[not(@ID)]" mode="schema_types"/>
+      </xsd:schema>
+    </types>
+  </xsl:template>
+
+  <!-- 1.1 - group of tests - schema include -->
+  <xsl:template match="itst:it_test_group[@ID]" mode="schema_import">
+    <xsd:import>
+      <xsl:attribute name="namespace">
+        <xsl:value-of select="concat('http://apache.org/type_test/types', @ID)"/>
+      </xsl:attribute>
+      <xsl:attribute name="schemaLocation">
+        <xsl:value-of select="concat($inc_xsd_path, '/type_test_', @ID, '.xsd')"/> 
+      </xsl:attribute>
+    </xsd:import>
+  </xsl:template>
+
+  <!-- 1.2 - group of tests - schema include -->
+  <xsl:template match="itst:it_test_group[not(@ID)]" mode="hardcoded_types">
+    <xsl:if test="$use_style='document'">
+      <xsd:element name="testVoid">
+        <xsd:complexType/>
+      </xsd:element>
+      <xsd:element name="testOneway">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="x" type="xsd:string"/>
+            <xsd:element name="y" type="xsd:string"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+    </xsl:if>
+  </xsl:template>
+  
+  <!-- 1.3 group of types (only for groups with no ID) -->
+  <xsl:template match="itst:it_test_group[not(@ID)]" mode="schema_types">
+    <xsl:apply-templates select="xsd:attribute" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:attributeGroup" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:group" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:simpleType" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:complexType" mode="schema_type"/>
+    <xsl:apply-templates select="xsd:element" mode="schema_type"/>
+  </xsl:template>
+  
+  <!-- 1.3.1 - schema type or construct -->
+  <xsl:template match="itst:it_test_group/*" mode="schema_type" xmlns="http://www.w3.org/2001/XMLSchema">
+      <xsl:element name="{name(.)}">
+        <!-- drop "it_no_test" from the attributes -->
+        <xsl:apply-templates select="@*[name()!='itst:it_no_test']" mode="attribute_copy"/>
+        <xsl:copy-of select="*"/>
+      </xsl:element>
+  </xsl:template>
+
+  <!-- 1.4 - group of tests - test elements -->
+  <xsl:template match="itst:it_test_group" mode="test_elements">
+    <xsl:if test="$use_style='document'">
+      <xsl:apply-templates select="xsd:simpleType[not(@itst:it_no_test='true')]"
+          mode="elements_xyz">
+        <xsl:with-param name="namespace" select="concat('x', @ID, ':')"/>
+      </xsl:apply-templates>
+      <xsl:apply-templates select="xsd:complexType[not(@itst:it_no_test='true')]"
+          mode="elements_xyz">
+        <xsl:with-param name="namespace" select="concat('x', @ID, ':')"/>
+      </xsl:apply-templates>
+      <xsl:apply-templates select="xsd:element[not(@itst:it_no_test='true')]"
+          mode="elements_xyz"/>
+      <xsl:apply-templates select="itst:builtIn[not(@itst:it_no_test='true')]"
+          mode="elements_xyz"/>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- 1.4.1 - group of x/y/z/return doc-literal test elements -->
+  <xsl:template match="itst:it_test_group/*" mode="elements_xyz">
+    <xsl:param name="namespace"/>
+    <xsl:param name="operation_name">
+      <xsl:value-of select="concat('test',
+                            concat(translate(substring(@name, 1, 1),    
+                                   'abcdefghijklmnopqrstuvwxyz', 
+                                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+                                   substring(@name, 2)))"/>
+    </xsl:param>
+      <xsd:element>
+        <xsl:attribute name="name">
+          <xsl:value-of select="$operation_name"/>
+        </xsl:attribute>
+        <xsl:apply-templates select="." mode="elements_in">
+          <xsl:with-param name="namespace" select="$namespace"/>
+        </xsl:apply-templates>
+      </xsd:element>
+      <xsd:element>
+        <xsl:attribute name="name">
+          <xsl:value-of select="concat($operation_name, 'Response')"/>
+        </xsl:attribute>
+        <xsl:apply-templates select="." mode="elements_out">
+          <xsl:with-param name="namespace" select="$namespace"/>
+        </xsl:apply-templates>
+      </xsd:element>
+  </xsl:template>
+
+  <!-- 1.4.1.1 - group of x/y test elements -->
+  <xsl:template match="itst:it_test_group/*[not(@itst:it_no_test='true')]" mode="elements_in">
+    <xsl:param name="namespace"/>
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsl:apply-templates select="." mode="parameter">
+          <xsl:with-param name="parametername">x</xsl:with-param>
+          <xsl:with-param name="namespace" select="$namespace"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="." mode="parameter">
+          <xsl:with-param name="parametername">y</xsl:with-param>
+          <xsl:with-param name="namespace" select="$namespace"/>
+        </xsl:apply-templates>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsl:template>
+
+  <!-- 1.4.1.2 - group of y/z/return test elements -->
+  <xsl:template match="itst:it_test_group/*[not(@itst:it_no_test='true')]" mode="elements_out">
+    <xsl:param name="namespace"/>
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsl:apply-templates select="." mode="parameter">
+          <xsl:with-param name="parametername">return</xsl:with-param>
+          <xsl:with-param name="namespace" select="$namespace"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="." mode="parameter">
+          <xsl:with-param name="parametername">y</xsl:with-param>
+          <xsl:with-param name="namespace" select="$namespace"/>
+        </xsl:apply-templates>
+        <xsl:apply-templates select="." mode="parameter">
+          <xsl:with-param name="parametername">z</xsl:with-param>
+          <xsl:with-param name="namespace" select="$namespace"/>
+        </xsl:apply-templates>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsl:template>
+
+  <!-- 1.4.2 - one parameter of a message -->
+  <xsl:template match="itst:it_test_group/*[not(@itst:it_no_test='true')]" mode="parameter">
+    <xsl:param name="parametername"/>
+    <xsl:param name="namespace"/>
+    <xsl:param name="schematype">
+      <xsl:value-of select="name(.)"/>
+    </xsl:param>
+    <xsd:element>
+      <xsl:attribute name="name">
+        <xsl:value-of select="$parametername"/>
+      </xsl:attribute>
+      <!-- parameter is a builtIn type -->
+      <xsl:if test="$schematype='itst:builtIn'">
+        <xsl:attribute name="type">
+          <xsl:value-of select="concat('xsd:', @name)"/>
+        </xsl:attribute>
+      </xsl:if>
+      <!-- parameter is a simple or complex type -->
+      <xsl:if test="($schematype='complexType') or ($schematype='simpleType')">
+        <xsl:attribute name="type">
+          <xsl:value-of select="concat($namespace, @name)"/>
+        </xsl:attribute>
+      </xsl:if>
+      <!-- otherwise for an element, copy it as the parameter -->
+      <xsl:if test="$schematype='element'">
+        <xsl:apply-templates select="@*[name(.)!='name']" mode="attribute_copy"/>
+        <xsl:copy-of select="*"/>
+      </xsl:if>
+    </xsd:element>
+  </xsl:template>
+
+  <!-- 2 - test messages -->
+  <xsl:template match="/xsd:schema" mode="test_messages">
+    <xsl:apply-templates select="." mode="hardcoded_messages"/>
+    <xsl:apply-templates select="itst:it_test_group" mode="test_messages_group"/>
+  </xsl:template>
+
+  <!-- 2.1 - hardcoded messages -->
+  <xsl:template match="/xsd:schema" mode="hardcoded_messages"
+        xmlns="http://schemas.xmlsoap.org/wsdl/">
+    <message name="testVoid">
+        <xsl:if test="$use_style='document'">
+          <part name="in" element="tns:testVoid"/>
+        </xsl:if>
+    </message>
+    <message name="testOneway">
+        <xsl:if test="$use_style='document'">
+          <part name="in" element="tns:testOneway"/>
+        </xsl:if>
+        <xsl:if test="$use_style='rpc'">
+          <part name="x" type="xsd:string"/>
+          <part name="y" type="xsd:string"/>
+        </xsl:if>
+    </message>
+  </xsl:template>
+
+  <!-- 2.2 - group of test messages -->
+  <xsl:template match="itst:it_test_group" mode="test_messages_group">
+    <xsl:apply-templates select="xsd:simpleType[not(@itst:it_no_test='true')]"
+        mode="test_messages">
+      <xsl:with-param name="namespace" select="concat('x', @ID, ':')"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="xsd:complexType[not(@itst:it_no_test='true')]"
+        mode="test_messages">
+      <xsl:with-param name="namespace" select="concat('x', @ID, ':')"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="xsd:element[not(@itst:it_no_test='true')]"
+        mode="test_messages">
+      <xsl:with-param name="namespace" select="concat('x', @ID, ':')"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="itst:builtIn[not(@itst:it_no_test='true')]"
+        mode="test_messages">
+      <xsl:with-param name="namespace">xsd:</xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:template>
+  
+  <!-- 2.2.1 - request and response messages -->
+  <xsl:template match="itst:it_test_group/*" 
+        mode="test_messages" xmlns="http://schemas.xmlsoap.org/wsdl/">
+    <!-- namespace is used for rpc style -->
+    <xsl:param name="namespace"/>
+    <xsl:variable name="message_name_prefix">
+      <xsl:value-of select="concat('test',
+                                   concat(translate(substring(@name, 1, 1),
+                                          'abcdefghijklmnopqrstuvwxyz', 
+                                          'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+                                          substring(@name, 2)))"/>
+    </xsl:variable>
+    <xsl:variable name="input_message_name">
+      <xsl:value-of select="$message_name_prefix"/>
+    </xsl:variable>
+    <xsl:variable name="output_message_name">
+      <xsl:value-of select="concat($message_name_prefix, 'Response')"/>
+    </xsl:variable>
+    <message>
+      <xsl:attribute name="name">
+        <xsl:value-of select="$input_message_name"/>
+      </xsl:attribute>
+      <xsl:if test="$use_style='document'">
+        <part>
+          <xsl:attribute name="name">in</xsl:attribute>
+          <xsl:attribute name="element">
+            <xsl:value-of select="concat('tns:', $message_name_prefix)"/>
+          </xsl:attribute>
+        </part>
+      </xsl:if>
+      <xsl:if test="$use_style='rpc'">
+        <part>
+          <xsl:attribute name="name">x</xsl:attribute>
+          <xsl:attribute name="type">
+            <xsl:value-of select="concat($namespace, @name)"/>
+          </xsl:attribute>
+        </part>
+        <part>
+          <xsl:attribute name="name">y</xsl:attribute>
+          <xsl:attribute name="type">
+            <xsl:value-of select="concat($namespace, @name)"/>
+          </xsl:attribute>
+        </part>
+      </xsl:if>
+    </message>
+    <message>
+      <xsl:attribute name="name">
+        <xsl:value-of select="$output_message_name"/>
+      </xsl:attribute>
+      <xsl:if test="$use_style='document'">
+        <part>
+          <xsl:attribute name="name">out</xsl:attribute>
+          <xsl:attribute name="element">
+            <xsl:value-of select="concat('tns:', $output_message_name)"/>
+          </xsl:attribute>
+        </part>
+      </xsl:if>
+      <xsl:if test="$use_style='rpc'">
+        <part>
+          <xsl:attribute name="name">return</xsl:attribute>
+          <xsl:attribute name="type">
+            <xsl:value-of select="concat($namespace, @name)"/>
+          </xsl:attribute>
+        </part>
+        <part>
+          <xsl:attribute name="name">y</xsl:attribute>
+          <xsl:attribute name="type">
+            <xsl:value-of select="concat($namespace, @name)"/>
+          </xsl:attribute>
+        </part>
+        <part>
+          <xsl:attribute name="name">z</xsl:attribute>
+          <xsl:attribute name="type">
+            <xsl:value-of select="concat($namespace, @name)"/>
+          </xsl:attribute>
+        </part>
+      </xsl:if>
+    </message>
+  </xsl:template>
+
+  <!-- 3 - test portType -->
+  <xsl:template match="/xsd:schema" mode="test_portType"
+        xmlns="http://schemas.xmlsoap.org/wsdl/">
+    <portType name="TypeTestPortType">
+      <xsl:apply-templates select="." mode="hardcoded_operations"/>
+      <xsl:apply-templates select="itst:it_test_group" mode="test_operations_group"/>
+    </portType>
+  </xsl:template>
+
+  <!-- 3.1 - hardcoded operations -->
+  <xsl:template match="/xsd:schema" mode="hardcoded_operations"
+        xmlns="http://schemas.xmlsoap.org/wsdl/">
+    <operation name="testVoid">
+      <input name="testVoid" message="tns:testVoid"/>
+    </operation>
+    <operation name="testOneway">
+      <input name="testOneway" message="tns:testOneway"/>
+    </operation>
+  </xsl:template>
+
+  <!-- 3.2 - group of test operations -->
+  <xsl:template match="itst:it_test_group" mode="test_operations_group">
+    <xsl:apply-templates select="xsd:simpleType[not(@itst:it_no_test='true')]"
+        mode="test_operation"/>
+    <xsl:apply-templates select="xsd:complexType[not(@itst:it_no_test='true')]"
+        mode="test_operation"/>
+    <!--
+    <xsl:apply-templates select="xsd:element[not(@itst:it_no_test='true')]"
+        mode="test_operation"/>
+    -->
+    <xsl:apply-templates select="itst:builtIn[not(@itst:it_no_test='true')]"
+        mode="test_operation"/>
+  </xsl:template>
+  
+  <!-- 3.2.1 - test operations -->
+  <xsl:template match="itst:it_test_group/*" mode="test_operation"
+        xmlns="http://schemas.xmlsoap.org/wsdl/">
+    <xsl:variable name="operation_name">
+      <xsl:value-of select="concat('test',
+                                   concat(translate(substring(@name, 1, 1),
+                                          'abcdefghijklmnopqrstuvwxyz', 
+                                          'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
+                                          substring(@name, 2)))"/>
+    </xsl:variable>
+    <xsl:variable name="operation_input_name">
+      <xsl:value-of select="$operation_name"/>
+    </xsl:variable>
+    <xsl:variable name="operation_output_name">
+      <xsl:value-of select="concat($operation_name, 'Response')"/>
+    </xsl:variable>
+    <xsl:variable name="input_message_name">
+      <xsl:value-of select="concat('tns:', $operation_input_name)"/>
+    </xsl:variable>
+    <xsl:variable name="output_message_name">
+      <xsl:value-of select="concat('tns:', $operation_output_name)"/>
+    </xsl:variable>
+    <operation>
+      <xsl:attribute name="name">
+        <xsl:value-of select="$operation_name"/>
+      </xsl:attribute>
+      <xsl:if test="$use_style='rpc'">
+        <xsl:attribute name="parameterOrder">x y z</xsl:attribute>
+      </xsl:if>
+      <input>
+        <xsl:attribute name="name">
+          <xsl:value-of select="$operation_input_name"/>
+        </xsl:attribute>
+        <xsl:attribute name="message">
+          <xsl:value-of select="$input_message_name"/>
+        </xsl:attribute>
+      </input>
+      <output>
+        <xsl:attribute name="name">
+          <xsl:value-of select="$operation_output_name"/>
+        </xsl:attribute>
+        <xsl:attribute name="message">
+          <xsl:value-of select="$output_message_name"/>
+        </xsl:attribute>
+      </output>
+    </operation>
+  </xsl:template>
+
+</xsl:stylesheet>
+

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl.xsl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl_service.xsl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl_service.xsl?view=auto&rev=487225
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl_service.xsl (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl_service.xsl Thu Dec 14 07:01:35 2006
@@ -0,0 +1,49 @@
+<?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.
+-->
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:xalan="http://xml.apache.org/xslt"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext"
+    xmlns:itst="http://tests.iona.com/ittests">
+
+  <xsl:output method="xml" indent="yes" xalan:indent-amount="4"/>
+  <xsl:strip-space elements="*"/>
+
+  <!-- 0 - root wsdl definitions -->
+  <xsl:template match="/wsdl:definitions">
+      <definitions
+          xmlns="http://schemas.xmlsoap.org/wsdl/"
+          xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" 
+          xmlns:tns="http://apache.org/type_test/corba"
+          targetNamespace="http://apache.org/type_test/corba"
+          name="type_test">
+          <xsl:copy-of select="*"/>
+          <service name="CORBAService">
+              <port name="CORBAPort" binding="tns:TypeTestCORBABinding">
+                  <corba:address location="corbaloc::localhost:40012/type_test"/>
+              </port>
+          </service>
+      </definitions>
+  </xsl:template>
+
+</xsl:stylesheet>
+

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl_service.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl_service.xsl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test_wsdl_service.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/yoko/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/pom.xml?view=diff&rev=487225&r1=487224&r2=487225
==============================================================================
--- incubator/yoko/trunk/pom.xml (original)
+++ incubator/yoko/trunk/pom.xml Thu Dec 14 07:01:35 2006
@@ -53,6 +53,7 @@
 
         <!-- versions of external dependencies -->
         <ant.version>1.6.5</ant.version>
+        <antrun.version>1.1</antrun.version>
         <antlr.version>2.7.5</antlr.version>
         <bcel.version>5.2</bcel.version>
         <cxf.version>2.0-incubator-M1-SNAPSHOT</cxf.version>
@@ -301,6 +302,12 @@
             </testResource>
             <testResource>
                 <directory>src/test/resources</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+            </testResource>
+            <testResource>
+                <directory>target/generated/src/test/resources</directory>
                 <includes>
                     <include>**</include>
                 </includes>

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java?view=diff&rev=487225&r1=487224&r2=487225
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java Thu Dec 14 07:01:35 2006
@@ -95,14 +95,7 @@
                         && schemaType.getName() == null)  {
                         Iterator it = getSchemaIterator(schemaType);
                         Iterator iter = getSchemaIterator(schemaType);
-                        while (it.hasNext()) {                        
-                            if (it.next() instanceof XmlSchemaElement) {
-                                XmlSchemaElement el = (XmlSchemaElement)iter.next();
-                                addParam(wsdlToCorbaBinding, el.getSchemaType(), 
-                                         el.getQName().getLocalPart(), 
-                                         el.getSchemaTypeName(), el.isNillable(), inputs);
-                            }                            
-                        }                        
+                        addParams(wsdlToCorbaBinding, inputs, it, iter);
                     } else {
                         XmlSchemaElement el = getElement(part, xmlSchemaList);                        
                         if (schemaType == null) {
@@ -122,6 +115,22 @@
             }
         }
     }
+
+    private void addParams(WSDLToCorbaBinding wsdlToCorbaBinding,
+                           List<ParamType> inputs, 
+                           Iterator it,
+                           Iterator iter) throws Exception {
+        if (it != null) {
+            while (it.hasNext()) {                        
+                if (it.next() instanceof XmlSchemaElement) {
+                    XmlSchemaElement el = (XmlSchemaElement)iter.next();
+                    addParam(wsdlToCorbaBinding, el.getSchemaType(), 
+                             el.getQName().getLocalPart(), 
+                             el.getSchemaTypeName(), el.isNillable(), inputs);
+                }
+            }
+        }  
+    }
     
     private void processInputParams(WSDLToCorbaBinding wsdlToCorbaBinding, 
                                      Operation operation, List<XmlSchema> xmlSchemaList, 
@@ -180,15 +189,7 @@
                         && schemaType.getName() == null)  {                        
                         Iterator it = getSchemaIterator(schemaType);
                         Iterator iter = getSchemaIterator(schemaType);
-                        while (it.hasNext()) {
-                            if (it.next() instanceof XmlSchemaElement) {
-                                XmlSchemaElement el = (XmlSchemaElement)iter.next();
-                                updateList(wsdlToCorbaBinding, el.getSchemaType(),
-                                           el.getQName().getLocalPart(),
-                                           el.getSchemaTypeName(), inputs, outputs,
-                                           el.isNillable());
-                            }                            
-                        }                        
+                        updateLists(wsdlToCorbaBinding, inputs, outputs, it, iter); 
                     } else {
                         XmlSchemaElement el = getElement(part, xmlSchemaList);                        
                         if (schemaType == null) {
@@ -209,7 +210,25 @@
                 }
             }
         }
-    }    
+    }
+
+    private void updateLists(WSDLToCorbaBinding wsdlToCorbaBinding,
+                             List<ParamType> inputs,
+                             List<ParamType> outputs,
+                             Iterator it,
+                             Iterator iter) throws Exception {
+        if (it != null) {
+            while (it.hasNext()) {
+                if (it.next() instanceof XmlSchemaElement) {
+                    XmlSchemaElement el = (XmlSchemaElement)iter.next();
+                    updateList(wsdlToCorbaBinding, el.getSchemaType(),
+                               el.getQName().getLocalPart(),
+                               el.getSchemaTypeName(), inputs, outputs,
+                               el.isNillable());
+                }
+            }
+        }               
+    }
         
     private void processOutputParams(WSDLToCorbaBinding wsdlToCorbaBinding, Operation operation,
                                       List<XmlSchema> xmlSchemaList, List<ParamType> inputs,
@@ -589,4 +608,4 @@
         return false;
     } 
    
-}
\ No newline at end of file
+}



Mime
View raw message