You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by dm...@apache.org on 2006/09/26 13:54:28 UTC
svn commit: r450052 - in /incubator/yoko/trunk/bindings/src/test:
java/org/apache/yoko/bindings/corba/ resources/wsdl/
Author: dmiddlem
Date: Tue Sep 26 06:54:27 2006
New Revision: 450052
URL: http://svn.apache.org/viewvc?view=rev&rev=450052
Log:
Adding a test for nested types. Also includes some general cleanup (YOKO-174)
Added:
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedTypeTest.java (with props)
incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl (with props)
Modified:
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplMarshalTest.java
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplTest.java
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplUnmarshalTest.java
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/TestUtils.java
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplMarshalTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplMarshalTest.java?view=diff&rev=450052&r1=450051&r2=450052
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplMarshalTest.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplMarshalTest.java Tue Sep 26 06:54:27 2006
@@ -1,3 +1,21 @@
+/**
+ * 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.yoko.bindings.corba;
import javax.xml.ws.Holder;
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplTest.java?view=diff&rev=450052&r1=450051&r2=450052
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplTest.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplTest.java Tue Sep 26 06:54:27 2006
@@ -584,7 +584,7 @@
assertTrue(resultMember3Value.floatValue() == member3Value.floatValue());
}
- public void testReadWriteUnionStruct() {
+ public void testReadWriteUnion() {
QName objName = new QName("object");
QName objIdlType = new QName(staxTestNamespaceURI, "TestUnion", staxTestPrefix);
CorbaTypeImpl type = CorbaUtils.getCorbaType(objIdlType, staxBindingImpl.getCorbaTypeMaps());
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplUnmarshalTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplUnmarshalTest.java?view=diff&rev=450052&r1=450051&r2=450052
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplUnmarshalTest.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaBindingImplUnmarshalTest.java Tue Sep 26 06:54:27 2006
@@ -1,3 +1,21 @@
+/**
+ * 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.yoko.bindings.corba;
import javax.xml.namespace.QName;
Added: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedTypeTest.java?view=auto&rev=450052
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedTypeTest.java (added)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedTypeTest.java Tue Sep 26 06:54:27 2006
@@ -0,0 +1,277 @@
+/**
+ * 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.yoko.bindings.corba;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.math.BigDecimal;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventFactory;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+
+import junit.framework.TestCase;
+
+import org.apache.schemas.yoko.bindings.corba.Enum;
+import org.apache.schemas.yoko.bindings.corba.Fixed;
+import org.apache.schemas.yoko.bindings.corba.Struct;
+import org.apache.yoko.bindings.corba.types.CorbaEnumHandler;
+import org.apache.yoko.bindings.corba.types.CorbaFixedHandler;
+import org.apache.yoko.bindings.corba.types.CorbaObjectHandler;
+import org.apache.yoko.bindings.corba.types.CorbaPrimitiveHandler;
+import org.apache.yoko.bindings.corba.types.CorbaStructHandler;
+import org.apache.yoko.wsdl.CorbaTypeImpl;
+import org.apache.yoko.orb.CORBA.OutputStream;
+import org.apache.yoko.orb.OCI.Buffer;
+
+import org.objectweb.celtix.Bus;
+import org.objectweb.celtix.bindings.BindingManager;
+import org.objectweb.celtix.ws.addressing.EndpointReferenceType;
+
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.TypeCode;
+
+public class CorbaNestedTypeTest extends TestCase {
+
+ private final String nestedNamespaceURI = "http://yoko.apache.org/nested/idl_types";
+ private final String nestedPrefix = "corbatm";
+
+ private TestUtils testUtils;
+ private ORB orb;
+ private Bus bus;
+ private EndpointReferenceType endpoint;
+ private CorbaBindingImpl bindingImpl;
+
+ public CorbaNestedTypeTest(String arg0) {
+ super(arg0);
+ }
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(CorbaBindingImplMarshalTest.class);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ testUtils = new TestUtils();
+
+ java.util.Properties props = System.getProperties();
+ props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
+ props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
+ props.put("yoko.orb.id", "Yoko-Test");
+ orb = ORB.init(new String[0], props);
+ bus = Bus.init(new String[0]);
+
+ // programmatically add the corba binding factory
+ BindingManager manager = bus.getBindingManager();
+ CorbaBindingFactory corbaBF = new CorbaBindingFactory();
+ corbaBF.init(bus);
+ manager.registerBinding(CorbaConstants.NU_WSDL_CORBA, corbaBF);
+
+ endpoint = testUtils.getNestedEndpointReference();
+ bindingImpl = new CorbaBindingImpl(bus, endpoint, orb, false);
+ }
+
+ protected void tearDown() throws Exception {
+ if (orb != null) {
+ try {
+ orb.destroy();
+ } catch (Exception ex) {
+ // Do nothing. Throw an Exception?
+ }
+ }
+ }
+
+ // Since the nested type aspect of this Binding really just involves the CorbaObjectHandlers and the
+ // reading an writing to and from Stax, we'll test just these components.
+
+ public void testNestedType() {
+ QName objName = new QName("object");
+ QName objIdlType = new QName(nestedNamespaceURI, "NestedStruct", nestedPrefix);
+ CorbaTypeImpl type = CorbaUtils.getCorbaType(objIdlType, bindingImpl.getCorbaTypeMaps());
+ assertTrue(type instanceof Struct);
+ Struct structType = (Struct)type;
+ TypeCode objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
+ CorbaStructHandler obj = new CorbaStructHandler(objName, objIdlType, objTypeCode, structType);
+ assertNotNull(obj);
+
+ // Create member 1, a BasicStruct
+ objName = new QName("member1");
+ objIdlType = new QName(nestedNamespaceURI, "BasicStruct", nestedPrefix);
+ type = CorbaUtils.getCorbaType(objIdlType, bindingImpl.getCorbaTypeMaps());
+ assertTrue(type instanceof Struct);
+ structType = (Struct)type;
+ objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
+ CorbaStructHandler member1Obj = new CorbaStructHandler(objName, objIdlType, objTypeCode, structType);
+ assertNotNull(member1Obj);
+
+ // Create the basic struct members
+ String nestedMember1Value = "Basic Member 1";
+ objName = new QName("member1");
+ objIdlType = CorbaConstants.NT_CORBA_STRING;
+ objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
+ CorbaPrimitiveHandler nestedMember1Obj =
+ new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
+ assertNotNull(nestedMember1Obj);
+ member1Obj.addMember(nestedMember1Obj);
+
+ Boolean nestedMember2Value = new Boolean(false);
+ objName = new QName("member2");
+ objIdlType = CorbaConstants.NT_CORBA_BOOLEAN;
+ objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
+ CorbaPrimitiveHandler nestedMember2Obj =
+ new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
+ assertNotNull(nestedMember2Obj);
+ member1Obj.addMember(nestedMember2Obj);
+
+ obj.addMember(member1Obj);
+
+ // Create member 2, a Basic Fixed
+ BigDecimal fixedValue = new BigDecimal("123.67");
+ objName = new QName("member2");
+ objIdlType = new QName(nestedNamespaceURI, "BasicFixed", nestedPrefix);
+ type = CorbaUtils.getCorbaType(objIdlType, bindingImpl.getCorbaTypeMaps());
+ assertTrue(type instanceof Fixed);
+ Fixed fixedType = (Fixed)type;
+ objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
+ CorbaFixedHandler member2Obj = new CorbaFixedHandler(objName, objIdlType, objTypeCode, fixedType);
+ assertNotNull(member2Obj);
+ obj.addMember(member2Obj);
+
+ // Create member 3, a Basic Enum
+ int enumIndex = 0;
+ objName = new QName("member3");
+ objIdlType = new QName(nestedNamespaceURI, "BasicEnum", nestedPrefix);
+ type = CorbaUtils.getCorbaType(objIdlType, bindingImpl.getCorbaTypeMaps());
+ assertTrue(type instanceof Enum);
+ Enum enumType = (Enum)type;
+ objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
+ CorbaEnumHandler member3Obj = new CorbaEnumHandler(objName, objIdlType, objTypeCode, enumType);
+ assertNotNull(member3Obj);
+ obj.addMember(member3Obj);
+
+ // Create member 4, a Basic Enum
+ Float floatValue = 123456.678f;
+ objName = new QName("member4");
+ objIdlType = CorbaConstants.NT_CORBA_FLOAT;
+ objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, bindingImpl.getCorbaTypeMaps());
+ CorbaPrimitiveHandler member4Obj = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
+ assertNotNull(member4Obj);
+ obj.addMember(member4Obj);
+
+ // Write to an output stream the way a CORBA application would marshal the data for the nested
+ // struct.
+ Buffer buf = new Buffer();
+ OutputStream oStream = new OutputStream(buf);
+
+ oStream.write_string(nestedMember1Value);
+ oStream.write_boolean(nestedMember2Value.booleanValue());
+ oStream.write_fixed(fixedValue.movePointRight(2));
+ oStream.write_long(enumIndex);
+ oStream.write_float(floatValue.floatValue());
+
+ InputStream iStream = oStream.create_input_stream();
+ CorbaObjectReader reader = new CorbaObjectReader(iStream);
+ reader.read(obj);
+
+ // Now that the Object has its values, try and write it to Stax
+ XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+ outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
+
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ XMLEventWriter evtWriter = null;
+ try {
+ evtWriter = outputFactory.createXMLEventWriter(outStream);
+ } catch (XMLStreamException ex) {
+ assertTrue(false);
+ }
+ assertNotNull(evtWriter);
+
+ XMLEventFactory factory = XMLEventFactory.newInstance();
+ try {
+ bindingImpl.writeObjectToStax(obj, evtWriter, factory, false);
+ evtWriter.flush();
+ } catch (XMLStreamException ex) {
+ assertTrue(false);
+ }
+
+ byte[] b = outStream.toByteArray();
+ for (int i = 0; i < b.length; ++i) {
+ System.out.print((char)b[i]);
+ }
+ System.out.println();
+
+ ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
+ XMLEventReader evtReader = null;
+ try {
+ evtReader = inputFactory.createXMLEventReader(inStream);
+ } catch (XMLStreamException ex) {
+ assertTrue(false);
+ }
+ assertNotNull(evtReader);
+
+ // Now use the Stax data to re-create a new object
+ CorbaObjectHandler result =
+ bindingImpl.readObjectFromStax(evtReader,
+ new QName(nestedNamespaceURI, "NestedStruct", nestedPrefix),
+ false);
+
+ // Verify that the object has the correct values
+ assertTrue(result instanceof CorbaStructHandler);
+ CorbaStructHandler nestedStructResult = (CorbaStructHandler)result;
+
+ result = nestedStructResult.getMember(0);
+ assertTrue(result instanceof CorbaStructHandler);
+ CorbaStructHandler structResult = (CorbaStructHandler)result;
+
+ // These are from the struct nested inside our other struct
+ result = structResult.getMember(0);
+ assertTrue(result instanceof CorbaPrimitiveHandler);
+ CorbaPrimitiveHandler structPrimitiveMemberResult = (CorbaPrimitiveHandler)result;
+ assertTrue(structPrimitiveMemberResult.getValueData().equals(nestedMember1Value.toString()));
+ result = structResult.getMember(1);
+ assertTrue(result instanceof CorbaPrimitiveHandler);
+ structPrimitiveMemberResult = (CorbaPrimitiveHandler)result;
+ assertTrue(structPrimitiveMemberResult.getValueData().equals(nestedMember2Value.toString()));
+
+ // This is the fixed nested inside our struct
+ result = nestedStructResult.getMember(1);
+ assertTrue(result instanceof CorbaFixedHandler);
+ CorbaFixedHandler fixedResult = (CorbaFixedHandler)result;
+ assertTrue(fixedResult.getValue().equals(fixedValue));
+
+ // This is the enum nested inside our struct
+ result = nestedStructResult.getMember(2);
+ assertTrue(result instanceof CorbaEnumHandler);
+ CorbaEnumHandler enumResult = (CorbaEnumHandler)result;
+ assertTrue(enumResult.getValue().equals(enumType.getEnumerator().get(enumIndex).getValue()));
+
+ // This is the primitive nested inside our struct
+ result = nestedStructResult.getMember(3);
+ assertTrue(result instanceof CorbaPrimitiveHandler);
+ CorbaPrimitiveHandler primitiveResult = (CorbaPrimitiveHandler)result;
+ assertTrue(primitiveResult.getValueData().equals(floatValue.toString()));
+ }
+
+}
\ No newline at end of file
Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedTypeTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaNestedTypeTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/TestUtils.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/TestUtils.java?view=diff&rev=450052&r1=450051&r2=450052
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/TestUtils.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/TestUtils.java Tue Sep 26 06:54:27 2006
@@ -49,4 +49,10 @@
QName serviceName = new QName("http://yoko.apache.org/ParamModes", "ParamModesCORBAService");
return EndpointReferenceUtils.getEndpointReference(wsdlUrl, serviceName, "ParamModesCORBAPort");
}
+
+ public EndpointReferenceType getNestedEndpointReference() {
+ URL wsdlUrl = getClass().getResource("/wsdl/Nested.wsdl");
+ QName serviceName = new QName("http://yoko.apache.org/nested", "NestedCORBAService");
+ return EndpointReferenceUtils.getEndpointReference(wsdlUrl, serviceName, "NestedCORBAPort");
+ }
}
Added: incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl?view=auto&rev=450052
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl (added)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl Tue Sep 26 06:54:27 2006
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ targetNamespace="http://yoko.apache.org/nested"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://yoko.apache.org/nested"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd1="http://yoko.apache.org/nested/types"
+ xmlns:corba="http://schemas.apache.org/yoko/bindings/corba"
+ xmlns:corbatm="http://yoko.apache.org/nested/idl_types"
+ xmlns:references="http://schemas.iona.com/references">
+ <types>
+ <schema targetNamespace="http://yoko.apache.org/nested/types"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <xsd:simpleType name="BasicEnum">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="RED"/>
+ <xsd:enumeration value="GREEN"/>
+ <xsd:enumeration value="BLUE"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="BasicStruct">
+ <xsd:sequence>
+ <xsd:element name="member1" type="xsd:string"/>
+ <xsd:element name="member2" type="xsd:boolean"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="NestedStruct">
+ <xsd:sequence>
+ <xsd:element name="member1" type="xsd1:BasicStruct"/>
+ <xsd:element name="member2" type="xsd:decimal"/>
+ <xsd:element name="member3" type="xsd1:BasicEnum"/>
+ <xsd:element name="member4" type="xsd:float"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BasicStructArray">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:BasicStruct" minOccurs="5" maxOccurs="5"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="NestedStructArray">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:NestedStruct" minOccurs="2" maxOccurs="2"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BasicFixedArray">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd:decimal" minOccurs="3" maxOccurs="3"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BasicEnumArray">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:BasicEnum" minOccurs="2" maxOccurs="2"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BasicStructSeq">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:BasicStruct" minOccurs="0" maxOccurs="4"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="NestedStructSeq">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:NestedStruct" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BasicFixedSeq">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd:decimal" minOccurs="0" maxOccurs="3"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BasicEnumSeq">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:BasicEnum" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="_A_AnonymousArray">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:BasicStruct" minOccurs="2" maxOccurs="2"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="AnonymousArray">
+ <xsd:sequence>
+ <xsd:element name="item" type="xsd1:_A_AnonymousArray" minOccurs="2" maxOccurs="2"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="_B_AnonTypesStruct">
+ <xsd:restriction base="xsd:string">
+ <xsd:maxLength value="2" fixed="true"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="AnonTypesStruct">
+ <xsd:sequence>
+ <xsd:element name="anonStr" type="xsd1:_B_AnonTypesStruct"/>
+ <xsd:element name="anonFixed" type="xsd:decimal"/>
+ <xsd:element name="anonArray" type="xsd1:AnonymousArray"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="testOperation">
+ <xsd:complexType>
+ <xsd:sequence>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="testOperationResult">
+ <xsd:complexType>
+ <xsd:sequence>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </schema>
+ </types>
+ <message name="testOperation">
+ <part name="parameters" element="xsd1:testOperation"/>
+ </message>
+ <message name="testOperationResponse">
+ <part name="parameters" element="xsd1:testOperationResult"/>
+ </message>
+ <portType name="Nested">
+ <operation name="testOperation">
+ <input message="tns:testOperation" name="testOperation"/>
+ <output message="tns:testOperationResponse" name="testOperationResponse"/>
+ </operation>
+ </portType>
+ <binding name="NestedCORBABinding" type="tns:Nested">
+ <corba:binding repositoryID="IDL:Nested:1.0"/>
+ <operation name="testOperation">
+ <corba:operation name="testOperation"/>
+ <input/>
+ <output/>
+ </operation>
+ </binding>
+ <service name="NestedCORBAService">
+ <port name="NestedCORBAPort" binding="tns:NestedCORBABinding">
+ <corba:address location="relfile://nested.ior"/>
+ </port>
+ </service>
+ <corba:typeMapping targetNamespace="http://yoko.apache.org/nested/idl_types">
+ <corba:enum name="BasicEnum" type="xsd1:BasicEnum" repositoryID="IDL:BasicEnum:1.0">
+ <corba:enumerator value="RED"/>
+ <corba:enumerator value="GREEN"/>
+ <corba:enumerator value="BLUE"/>
+ </corba:enum>
+ <corba:fixed name="BasicFixed" repositoryID="IDL:BasicFixed:1.0" type="xsd:decimal" digits="3" scale="2"/>
+ <corba:struct name="BasicStruct" type="xsd1:BasicStruct" repositoryID="IDL:BasicStruct:1.0">
+ <corba:member name="member1" idltype="corba:string"/>
+ <corba:member name="member2" idltype="corba:boolean"/>
+ </corba:struct>
+ <corba:struct name="NestedStruct" type="xsd1:NestedStruct" repositoryID="IDL:NestedStruct:1.0">
+ <corba:member name="member1" idltype="corbatm:BasicStruct"/>
+ <corba:member name="member2" idltype="corbatm:BasicFixed"/>
+ <corba:member name="member3" idltype="corbatm:BasicEnum"/>
+ <corba:member name="member4" idltype="corba:float"/>
+ </corba:struct>
+ <corba:array name="BasicStructArray" repositoryID="IDL:BasicStructArray:1.0" type="xsd1:BasicStructArray" elemtype="corbatm:BasicStruct" bound="5"/>
+ <corba:array name="NestedStructArray" repositoryID="IDL:NestedStructArray:1.0" type="xsd1:NestedStructArray" elemtype="corbatm:NestedStruct" bound="2"/>
+ <corba:array name="BasicFixedArray" repositoryID="IDL:BasicFixedArray:1.0" type="xsd1:BasicFixedArray" elemtype="corbatm:BasicFixed" bound="3"/>
+ <corba:array name="BasicEnumArray" repositoryID="IDL:BasicEnumArray:1.0" type="xsd1:BasicEnumArray" elemtype="corbatm:BasicEnum" bound="2"/>
+ <corba:sequence name="BasicStructSeq" repositoryID="IDL:BasicStructSeq:1.0" type="xsd1:BasicStructSeq" elemtype="corbatm:BasicStruct" bound="4"/>
+ <corba:sequence name="NestedStructSeq" repositoryID="IDL:NestedStructSeq:1.0" type="xsd1:NestedStructSeq" elemtype="corbatm:NestedStruct" bound="0"/>
+ <corba:sequence name="BasicFixedSeq" repositoryID="IDL:BasicFixedSeq:1.0" type="xsd1:BasicFixedSeq" elemtype="corbatm:BasicFixed" bound="3"/>
+ <corba:sequence name="BasicEnumSeq" repositoryID="IDL:BasicEnumSeq:1.0" type="xsd1:BasicEnumSeq" elemtype="corbatm:BasicEnum" bound="0"/>
+ <corba:anonarray name="_C_AnonymousArray" type="xsd1:_C_AnonymousArray" elemtype="corbatm:BasicStruct" bound="2"/>
+ <corba:array name="AnonymousArray" repositoryID="IDL:AnonymousArray:1.0" type="xsd1:AnonymousArray" elemtype="corbatm:_C_AnonymousArray" bound="2"/>
+ <corba:anonstring name="_B_AnonTypesStruct" type="xsd1:_B_AnonTypesStruct" bound="2"/>
+ <corba:anonfixed name="_D_AnonTypesStruct" type="xsd:decimal" digits="2" scale="2"/>
+ <corba:struct name="AnonTypesStruct" type="xsd1:AnonTypesStruct" repositoryID="IDL:AnonTypesStruct:1.0">
+ <corba:member name="anonStr" idltype="corbatm:_B_AnonTypesStruct"/>
+ <corba:member name="anonFixed" idltype="corbatm:_D_AnonTypesStruct"/>
+ <corba:member name="anonArray" idltype="corbatm:AnonymousArray"/>
+ </corba:struct>
+ </corba:typeMapping>
+</definitions>
Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/yoko/trunk/bindings/src/test/resources/wsdl/Nested.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml