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 mv...@apache.org on 2006/11/15 11:44:55 UTC
svn commit: r475208 - in
/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src:
main/java/org/apache/yoko/tools/processors/idl/ test/resources/idl/
Author: mvescovi
Date: Wed Nov 15 03:44:53 2006
New Revision: 475208
URL: http://svn.apache.org/viewvc?view=rev&rev=475208
Log:
YOKO-67 Initial commit to add dotted scoping. Fixed wchar and long double corba type bugs.
Modified:
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ModuleVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ParamTypeSpecVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/PrimitiveTypesVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/SimpleTypeSpecVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypesUtils.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonboundedsequence.wsdl
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonsequence.wsdl
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Primitives.wsdl
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Sequence.wsdl
incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Typedef.wsdl
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java Wed Nov 15 03:44:53 2006
@@ -91,6 +91,10 @@
}
public void visit(AST attributeNode) {
+ // <attr_dcl> ::= ["readonly"] "attribute" <param_type_spec> <simple_declarator>
+ // {"," <simple_declarator>}*
+
+
AST node = attributeNode.getFirstChild();
AST readonlyNode = null;
@@ -122,7 +126,7 @@
PARAM_NAME);
// generate wrapped doc element out parameter
XmlSchemaElement outParameters =
- generateWrappedDocElement(typeNode,
+ generateWrappedDocElement(typeNode,
GETTER_PREFIX + nameNode.toString() + RESULT_POSTFIX,
RETURN_PARAM_NAME);
@@ -211,8 +215,11 @@
private XmlSchemaElement generateWrappedDocElement(AST typeNode, String name, String paramName) {
XmlSchemaElement element = new XmlSchemaElement();
if (typeNode != null) {
- //element.setSchemaType(TypesUtils.findType(schemas, schema, typeNode));
- element.setSchemaTypeName(TypesUtils.findType(schemas, schema, typeNode).getQName());
+ ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(), schemas, schema, typeMap);
+ visitor.visit(typeNode);
+ XmlSchemaType stype = visitor.getSchemaType();
+
+ element.setSchemaTypeName(stype.getQName());
element.setName(paramName);
}
@@ -274,8 +281,9 @@
ArgType param = new ArgType();
param.setName(RETURN_PARAM_NAME);
- XmlSchemaType stype = TypesUtils.findType(schemas, schema, type);
- CorbaTypeImpl corbaType = TypesUtils.findCorbaType(typeMap, stype.getQName());
+ ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(), schemas, schema, typeMap);
+ visitor.visit(type);
+ CorbaTypeImpl corbaType = visitor.getCorbaType();
param.setIdltype(corbaType.getQName());
@@ -287,8 +295,9 @@
param.setName(PARAM_NAME);
param.setMode(ModeType.IN);
- XmlSchemaType stype = TypesUtils.findType(schemas, schema, type);
- CorbaTypeImpl corbaType = TypesUtils.findCorbaType(typeMap, stype.getQName());
+ ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(), schemas, schema, typeMap);
+ visitor.visit(type);
+ CorbaTypeImpl corbaType = visitor.getCorbaType();
param.setIdltype(corbaType.getQName());
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java Wed Nov 15 03:44:53 2006
@@ -30,6 +30,8 @@
import org.apache.ws.commons.schema.XmlSchemaCollection;
import org.apache.ws.commons.schema.XmlSchemaType;
+import org.apache.yoko.wsdl.CorbaTypeImpl;
+
public class ConstVisitor extends VisitorBase {
public ConstVisitor(Scope scope,
@@ -47,6 +49,19 @@
}
public void visit(AST constNode) {
+ // <const_dcl> ::= "const" <const_type> <identifier> "=" <const_exp>
+ // <const_type> ::= <integer_type>
+ // | <char_type>
+ // | <wide_char_type>
+ // | <boolean_type>
+ // | <floating_pt_type>
+ // | <string_type>
+ // | <wide_string_type>
+ // | <fixed_pt_const_type>
+ // | <scoped_name>
+ // | <octet_type>
+
+
AST constTypeNode = constNode.getFirstChild();
AST constNameNode = TypesUtils.getPrimitiveCorbaTypeNameNode(constTypeNode);
AST constValueNode = constNameNode.getNextSibling();
@@ -62,16 +77,14 @@
QName constQName = new QName(typeMap.getTargetNamespace(),
constNameNode.toString());
- // xsd::schemaType
- XmlSchemaType constSchemaType = TypesUtils.findType(schemas, schema, constTypeNode);
-
- // corba:type
- //// There is a problem with retrieving the corba:type from a schema:type
- // the schema:type -> corba:type is not one-to-one
- //CorbaTypeImpl constCorbaType = TypesUtils.findCorbaType(typeMap, constSchemaType.getQName());
-
- // const types are guaranteed to be primitive types
- QName constCorbaTypeName = TypesUtils.findCorbaTypeName(typeMap, constTypeNode);
+ // TEMPORARILY
+ // using TypesVisitor to visit <const_type>
+ // it should be visited by a ConstTypeVisitor
+ TypesVisitor visitor = new TypesVisitor(getScope(), schemas, schema, typeMap, constNameNode);
+ visitor.visit(constTypeNode);
+ XmlSchemaType constSchemaType = visitor.getSchemaType();
+ CorbaTypeImpl constCorbaType = visitor.getCorbaType();
+ QName constCorbaTypeName = constCorbaType.getQName();
// corba:const
Const corbaConst = new Const();
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ModuleVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ModuleVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ModuleVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ModuleVisitor.java Wed Nov 15 03:44:53 2006
@@ -49,7 +49,7 @@
while (definitionNode != null) {
DefinitionVisitor definitionVisitor =
- new DefinitionVisitor(new Scope(getScope(), identifierNode.toString()),
+ new DefinitionVisitor(new Scope(getScope(), identifierNode),
definition,
schemas,
schema,
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ParamTypeSpecVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ParamTypeSpecVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ParamTypeSpecVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ParamTypeSpecVisitor.java Wed Nov 15 03:44:53 2006
@@ -47,7 +47,7 @@
if (PrimitiveTypesVisitor.accept(node)) {
// base_type_spec
- visitor = new PrimitiveTypesVisitor(getScope(), schemas, schema, typeMap);
+ visitor = new PrimitiveTypesVisitor(getScope());
} else if (StringVisitor.accept(node)) {
// string_type_spec
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/PrimitiveTypesVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/PrimitiveTypesVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/PrimitiveTypesVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/PrimitiveTypesVisitor.java Wed Nov 15 03:44:53 2006
@@ -22,14 +22,21 @@
import java.util.ArrayList;
import java.util.List;
-import antlr.collections.AST;
+import javax.xml.namespace.QName;
-import org.apache.schemas.yoko.bindings.corba.TypeMappingType;
+import antlr.collections.AST;
-import org.apache.ws.commons.schema.XmlSchema;
import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaType;
+import org.apache.yoko.tools.common.CorbaPrimitiveMap;
+import org.apache.yoko.tools.common.XmlSchemaPrimitiveMap;
+import org.apache.yoko.wsdl.CorbaConstants;
+import org.apache.yoko.wsdl.CorbaTypeImpl;
-public class PrimitiveTypesVisitor extends VisitorBase {
+public class PrimitiveTypesVisitor implements Visitor {
+
+ private static CorbaPrimitiveMap corbaPrimitiveMap = new CorbaPrimitiveMap();
+ private static XmlSchemaPrimitiveMap xmlSchemaPrimitiveMap = new XmlSchemaPrimitiveMap();
private static final List<Integer> PRIMITIVE_TYPES = new ArrayList<Integer>();
@@ -44,16 +51,15 @@
PRIMITIVE_TYPES.add(new Integer(IDLTokenTypes.LITERAL_boolean));
PRIMITIVE_TYPES.add(new Integer(IDLTokenTypes.LITERAL_any));
PRIMITIVE_TYPES.add(new Integer(IDLTokenTypes.LITERAL_octet));
-// PRIMITIVE_TYPES.add(new Integer(IDLTokenTypes.LITERAL_string));
-// PRIMITIVE_TYPES.add(new Integer(IDLTokenTypes.LITERAL_wstring));
PRIMITIVE_TYPES.add(new Integer(IDLTokenTypes.LITERAL_any));
}
- public PrimitiveTypesVisitor(Scope scope,
- XmlSchemaCollection xmlSchemas,
- XmlSchema xmlSchema,
- TypeMappingType typeMapRef) {
- super(scope, xmlSchemas, xmlSchema, typeMapRef);
+ private XmlSchemaType schemaType;
+ private CorbaTypeImpl corbaType;
+ private Scope scope;
+
+ public PrimitiveTypesVisitor(Scope scopeRef) {
+ scope = scopeRef;
}
public static boolean accept(AST node) {
@@ -61,12 +67,144 @@
}
public void visit(AST node) {
- // <base_type_spec> ::= ... PrimitiveVisitor
+ // <base_type_spec> ::= <floating_pt_type>
+ // | <integer_type>
+ // | <char_type>
+ // | <wide_char_type>
+ // | <boolean_type>
+ // | <octet_type>
+ // | <any_type>
+ // | <object_type> <= NOT SUPPORTED
+ // | <value_base_type> <= NOT SUPPORTED
+ // <floating_pt_type> ::= "float"
+ // | "double"
+ // | "long" double"
+ // <integer_type> ::= <signed_int>
+ // | <unsigned_int>
+ // <signed_int> ::= <signed_short_int>
+ // | <signed_long_int>
+ // | <signed_longlong_int>
+ // <signed_short_int> ::= "short"
+ // <signed_long_int> ::= "long"
+ // <signed_longlong_int> ::= "long" "long"
+ // <unsigned_int> ::= <unsigned_short_int>
+ // | <unsigned_long_int>
+ // | <unsigned_longlong_int>
+ // <unsigned_short_int> ::= "unsigned" "short"
+ // <unsigned_long_int> ::= "unsigned" "long"
+ // <unsigned_longlong_int> ::= "unsigned" "long" "long"
+ // <char_type> ::= "char"
+ // <wide_char_type> ::= "wchar"
+ // <boolean_type> ::= "boolean"
+ // <octet_type> ::= "octet"
+ // <any_type> ::= "any"
+
- setSchemaType(TypesUtils.findType(schemas, schema, node));
- if (getSchemaType() != null) {
- setCorbaType(TypesUtils.findCorbaType(typeMap, getSchemaType().getQName()));
+ XmlSchemaType stype = null;
+ CorbaTypeImpl ctype = null;
+ QName corbaTypeQName = PrimitiveTypesVisitor.getPrimitiveType(node);
+ if (corbaTypeQName != null) {
+ QName schemaTypeQName = xmlSchemaPrimitiveMap.get(corbaTypeQName);
+ if (schemaTypeQName != null) {
+ XmlSchemaCollection schemas = new XmlSchemaCollection();
+ stype = schemas.getTypeByQName(schemaTypeQName);
+ if (stype != null) {
+ ctype = new CorbaTypeImpl();
+ ctype.setQName(corbaTypeQName);
+ ctype.setType(stype.getQName());
+ ctype.setName(stype.getQName().getLocalPart());
+ }
+ }
}
+
+
+ schemaType = stype;
+ corbaType = ctype;
+ }
+
+ public XmlSchemaType getSchemaType() {
+ return schemaType;
}
+ public CorbaTypeImpl getCorbaType() {
+ return corbaType;
+ }
+
+ public Scope getScope() {
+ return scope;
+ }
+
+ public static QName getPrimitiveType(AST node) {
+ QName result = null;
+ switch (node.getType()) {
+ case IDLTokenTypes.LITERAL_long:
+ if ((node.getNextSibling() != null)
+ && (node.getNextSibling().getType() == IDLTokenTypes.LITERAL_long)) {
+ // long long
+ result = CorbaConstants.NT_CORBA_LONGLONG;
+ } else if ((node.getFirstChild() != null)
+ && (node.getFirstChild().getType() == IDLTokenTypes.LITERAL_double)) {
+ // "double" node is a child of "long" node - instead of being a sibling
+ // long double
+ result = CorbaConstants.NT_CORBA_LONGDOUBLE;
+ } else {
+ // long
+ result = CorbaConstants.NT_CORBA_LONG;
+ }
+ break;
+ case IDLTokenTypes.LITERAL_unsigned:
+ AST node2 = node.getNextSibling();
+ if (node2 != null && node2.getType() == IDLTokenTypes.LITERAL_short) {
+ // unsigned short
+ result = CorbaConstants.NT_CORBA_USHORT;
+ } else if (node2 != null && node2.getType() == IDLTokenTypes.LITERAL_long) {
+ AST node3 = node2.getNextSibling();
+ if (node3 != null && node3.getType() == IDLTokenTypes.LITERAL_long) {
+ // unsigned long long
+ result = CorbaConstants.NT_CORBA_ULONGLONG;
+ } else {
+ // unsigned long
+ result = CorbaConstants.NT_CORBA_ULONG;
+ }
+ } else {
+ // TBD: we should never get here
+ }
+ break;
+ case IDLTokenTypes.LITERAL_short:
+ result = CorbaConstants.NT_CORBA_SHORT;
+ break;
+ case IDLTokenTypes.LITERAL_float:
+ result = CorbaConstants.NT_CORBA_FLOAT;
+ break;
+ case IDLTokenTypes.LITERAL_double:
+ result = CorbaConstants.NT_CORBA_DOUBLE;
+ break;
+ case IDLTokenTypes.LITERAL_char:
+ result = CorbaConstants.NT_CORBA_CHAR;
+ break;
+ case IDLTokenTypes.LITERAL_wchar:
+ result = CorbaConstants.NT_CORBA_WCHAR;
+ break;
+ case IDLTokenTypes.LITERAL_string:
+ result = CorbaConstants.NT_CORBA_STRING;
+ break;
+ case IDLTokenTypes.LITERAL_wstring:
+ result = CorbaConstants.NT_CORBA_WSTRING;
+ break;
+ case IDLTokenTypes.LITERAL_boolean:
+ result = CorbaConstants.NT_CORBA_BOOLEAN;
+ break;
+ case IDLTokenTypes.LITERAL_octet:
+ result = CorbaConstants.NT_CORBA_OCTET;
+ break;
+ case IDLTokenTypes.LITERAL_any:
+ result = CorbaConstants.NT_CORBA_ANY;
+ break;
+ default:
+ // TBD
+ break;
+ }
+ return result;
+ }
+
}
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java Wed Nov 15 03:44:53 2006
@@ -19,6 +19,8 @@
package org.apache.yoko.tools.processors.idl;
+import java.util.Iterator;
+
import javax.xml.namespace.QName;
import antlr.collections.AST;
@@ -31,6 +33,7 @@
import org.apache.ws.commons.schema.constants.Constants;
+import org.apache.yoko.wsdl.CorbaConstants;
import org.apache.yoko.wsdl.CorbaTypeImpl;
public class ScopedNameVisitor extends VisitorBase {
@@ -45,11 +48,15 @@
public static boolean accept(XmlSchemaCollection schemas,
XmlSchema schema,
TypeMappingType typeMap,
+// Scope scope,
AST node) {
- if (findSchemaType(schemas, schema, typeMap, node) == null) {
- return false;
+ boolean result = false;
+ if (PrimitiveTypesVisitor.accept(node)) {
+ result = true;
+ } else if (findSchemaType(schemas, schema, typeMap, node) != null) {
+ result = true;
}
- return true;
+ return result;
}
public void visit(AST node) {
@@ -57,9 +64,52 @@
// | :: <identifier>
// | <scoped_name> "::" <identifier>
+ XmlSchemaType stype = null;
+ CorbaTypeImpl ctype = null;
+
+ if (PrimitiveTypesVisitor.accept(node)) {
+ // primitive type
+
+ PrimitiveTypesVisitor primitiveVisitor = new PrimitiveTypesVisitor(null);
+ primitiveVisitor.visit(node);
+
+ stype = primitiveVisitor.getSchemaType();
+ ctype = primitiveVisitor.getCorbaType();
+ } else {
+ // declared type
+// Scope scopedName = new Scope(scope, node);
+// QName schemaQName = new QName(schema.getTargetNamespace(), scopedName.toString());
+ QName schemaQName = new QName(schema.getTargetNamespace(), node.toString());
+
+ stype = schema.getTypeByName(schemaQName);
+
+ // handle special case of simple string alias
+ // a plain xsd:string has no corresponding XmlSchemaType in the XmlSchema
+ // so the previous findType() method would return null.
+ // As a temporary workaround, we query the typeMap for a corba:string with
+ // same name. If the string is there, then it had been previously properly
+ // declared and we can use it here.
+ if (stype == null) {
+ QName corbaQName = new QName(typeMap.getTargetNamespace(), node.toString());
+ ctype = findCorbaType(typeMap, corbaQName);
+ if (ctype != null && ctype.getType() == Constants.XSD_STRING) {
+ stype = schemas.getTypeByQName(Constants.XSD_STRING);
+ ctype = new CorbaTypeImpl();
+ ctype.setName(CorbaConstants.NT_CORBA_STRING.getLocalPart());
+ ctype.setQName(CorbaConstants.NT_CORBA_STRING);
+ ctype.setType(Constants.XSD_STRING);
+ } else {
+ throw new RuntimeException("[ScopedNameVisitor: Corba type "
+ + corbaQName.toString()
+ + " not found in typeMap]");
+ }
+ } else {
+ ctype = findCorbaType(typeMap, stype.getQName());
+ }
+ }
- setSchemaType(findSchemaType(schemas, schema, typeMap, node));
- setCorbaType(TypesUtils.findCorbaType(typeMap, getSchemaType().getQName()));
+ setSchemaType(stype);
+ setCorbaType(ctype);
}
@@ -67,9 +117,14 @@
XmlSchema schema,
TypeMappingType typeMap,
AST node) {
- // REVISIT remove dependency on TypesUtils
+ XmlSchemaType result = null;
+ if (result == null) {
+// Scope scopedName = new Scope(scope, node);
+// QName qname = new QName(schema.getTargetNamespace(), scopedName.toString());
+ QName qname = new QName(schema.getTargetNamespace(), node.toString());
+ result = schema.getTypeByName(qname);
+ }
- XmlSchemaType result = TypesUtils.findType(schemas, schema, node);
// handle special case of simple string alias
// a plain xsd:string has no corresponding XmlSchemaType in the XmlSchema
// so the previous findType() method would return null.
@@ -78,17 +133,26 @@
// declared and we can use it here.
if (result == null) {
QName corbaStringQname = new QName(typeMap.getTargetNamespace(), node.toString());
- CorbaTypeImpl ctype = TypesUtils.findCorbaType(typeMap, corbaStringQname);
+ CorbaTypeImpl ctype = findCorbaType(typeMap, corbaStringQname);
if (ctype != null
&& ctype.getType() == Constants.XSD_STRING) {
result = schemas.getTypeByQName(Constants.XSD_STRING);
- } else {
- throw new RuntimeException("[ScopedNameVisitor: Corba type "
- + corbaStringQname.toString()
- + " not found in typeMap]");
}
}
return result;
}
+ public static CorbaTypeImpl findCorbaType(TypeMappingType typeMap, QName schemaTypeName) {
+ CorbaTypeImpl result = null;
+ Iterator corbaTypes = typeMap.getStructOrExceptionOrUnion().iterator();
+ while (corbaTypes.hasNext()) {
+ CorbaTypeImpl type = (CorbaTypeImpl) corbaTypes.next();
+ if (type.getQName().getLocalPart().equals(schemaTypeName.getLocalPart())) {
+ result = type;
+ break;
+ }
+ }
+ return result;
+ }
+
}
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/SimpleTypeSpecVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/SimpleTypeSpecVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/SimpleTypeSpecVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/SimpleTypeSpecVisitor.java Wed Nov 15 03:44:53 2006
@@ -57,7 +57,7 @@
if (PrimitiveTypesVisitor.accept(node)) {
// simple_type_spec - base_type_spec
- visitor = new PrimitiveTypesVisitor(getScope(), schemas, schema, typeMap);
+ visitor = new PrimitiveTypesVisitor(getScope());
} else if (TemplateTypeSpecVisitor.accept(node)) {
// simple_type_spec - template_type_spec
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/StructVisitor.java Wed Nov 15 03:44:53 2006
@@ -62,6 +62,7 @@
Scope newScope = new Scope(getScope(), identifierNode);
// xmlschema:struct
String structName = identifierNode.toString();
+ //String structName = newScope.toString();
XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema);
complexType.setName(structName);
XmlSchemaSequence sequence = new XmlSchemaSequence();
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypesUtils.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypesUtils.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypesUtils.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/TypesUtils.java Wed Nov 15 03:44:53 2006
@@ -19,70 +19,13 @@
package org.apache.yoko.tools.processors.idl;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
import antlr.collections.AST;
-import org.apache.schemas.yoko.bindings.corba.TypeMappingType;
-
-import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.XmlSchemaCollection;
-import org.apache.ws.commons.schema.XmlSchemaType;
-import org.apache.yoko.tools.common.CorbaPrimitiveMap;
-import org.apache.yoko.tools.common.XmlSchemaPrimitiveMap;
-import org.apache.yoko.wsdl.CorbaConstants;
-import org.apache.yoko.wsdl.CorbaTypeImpl;
-
public final class TypesUtils {
- static CorbaPrimitiveMap corbaPrimitiveMap = new CorbaPrimitiveMap();
- static XmlSchemaPrimitiveMap xmlSchemaPrimitiveMap = new XmlSchemaPrimitiveMap();
-
private TypesUtils() {
//complete
}
-
- public static XmlSchemaType findType(XmlSchemaCollection schemas, XmlSchema schema, AST node) {
- XmlSchemaType result = null;
- QName corbaType = getPrimitiveType(node);
- if (corbaType != null) {
- QName schemaType = xmlSchemaPrimitiveMap.get(corbaType);
- if (schemaType != null) {
- result = schemas.getTypeByQName(schemaType);
- }
- }
- if (result == null) {
- //REVISIT, properly reference the node name, need to look at the siblings.
- QName qname = new QName(schema.getTargetNamespace(), node.toString());
- result = schema.getTypeByName(qname);
- }
- if (result == null) {
- // template_type_spec
- System.out.println("Invalid IDL! Error parsing: " + node.toStringTree());
- }
- return result;
- }
-
- public static CorbaTypeImpl findCorbaType(TypeMappingType typeMap, QName schemaTypeName) {
- CorbaTypeImpl result = (CorbaTypeImpl) corbaPrimitiveMap.get(schemaTypeName);
- if (result == null) {
- Iterator corbaTypes = typeMap.getStructOrExceptionOrUnion().iterator();
- while (corbaTypes.hasNext()) {
- CorbaTypeImpl type = (CorbaTypeImpl) corbaTypes.next();
- if (type.getQName().getLocalPart().equals(schemaTypeName.getLocalPart())) {
- result = type;
- break;
- }
- }
- }
- return result;
- }
-
- public static QName findCorbaTypeName(TypeMappingType typeMap, AST node) {
- return getPrimitiveType(node);
- }
/** Returns node corresponding to the name of the CORBA primitive type node.
*
@@ -102,79 +45,6 @@
return currentNode.getNextSibling();
}
- private static QName getPrimitiveType(AST node) {
- QName result = null;
- switch (node.getType()) {
- case IDLTokenTypes.LITERAL_long:
- if ((node.getNextSibling() != null)
- && (node.getNextSibling().getType() == IDLTokenTypes.LITERAL_long)) {
- // long long
- result = CorbaConstants.NT_CORBA_LONGLONG;
- } else if ((node.getFirstChild() != null)
- && (node.getFirstChild().getType() == IDLTokenTypes.LITERAL_double)) {
- // "double" node is a child of "long" node - instead of being a sibling
- // long double
- result = CorbaConstants.NT_CORBA_LONGDOUBLE;
- } else {
- // long
- result = CorbaConstants.NT_CORBA_LONG;
- }
- break;
- case IDLTokenTypes.LITERAL_unsigned:
- AST node2 = node.getNextSibling();
- if (node2 != null && node2.getType() == IDLTokenTypes.LITERAL_short) {
- // unsigned short
- result = CorbaConstants.NT_CORBA_USHORT;
- } else if (node2 != null && node2.getType() == IDLTokenTypes.LITERAL_long) {
- AST node3 = node2.getNextSibling();
- if (node3 != null && node3.getType() == IDLTokenTypes.LITERAL_long) {
- // unsigned long long
- result = CorbaConstants.NT_CORBA_ULONGLONG;
- } else {
- // unsigned long
- result = CorbaConstants.NT_CORBA_ULONG;
- }
- } else {
- // TBD: we should never get here
- }
- break;
- case IDLTokenTypes.LITERAL_short:
- result = CorbaConstants.NT_CORBA_SHORT;
- break;
- case IDLTokenTypes.LITERAL_float:
- result = CorbaConstants.NT_CORBA_FLOAT;
- break;
- case IDLTokenTypes.LITERAL_double:
- result = CorbaConstants.NT_CORBA_DOUBLE;
- break;
- case IDLTokenTypes.LITERAL_char:
- result = CorbaConstants.NT_CORBA_CHAR;
- break;
- case IDLTokenTypes.LITERAL_wchar:
- result = CorbaConstants.NT_CORBA_WCHAR;
- break;
- case IDLTokenTypes.LITERAL_string:
- result = CorbaConstants.NT_CORBA_STRING;
- break;
- case IDLTokenTypes.LITERAL_wstring:
- result = CorbaConstants.NT_CORBA_WSTRING;
- break;
- case IDLTokenTypes.LITERAL_boolean:
- result = CorbaConstants.NT_CORBA_BOOLEAN;
- break;
- case IDLTokenTypes.LITERAL_octet:
- result = CorbaConstants.NT_CORBA_OCTET;
- break;
- case IDLTokenTypes.LITERAL_any:
- result = CorbaConstants.NT_CORBA_ANY;
- break;
- default:
- // TBD
- break;
- }
- return result;
- }
-
public static boolean isValidIdentifier(String id) {
boolean result = true;
// From the CORBA IDL spec (section 3.2.3):
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/main/java/org/apache/yoko/tools/processors/idl/UnionVisitor.java Wed Nov 15 03:44:53 2006
@@ -83,10 +83,18 @@
unionSchemaComplexType.setName(identifierNode.toString());
unionSchemaComplexType.setParticle(sequence);
+ // REVISIT
+ // TEMPORARILY
+ // using TypesVisitor to visit <const_type>
+ // it should be visited by a SwitchTypeSpecVisitor
+ TypesVisitor visitor = new TypesVisitor(getScope(), schemas, schema, typeMap, null);
+ visitor.visit(discriminatorNode);
+ XmlSchemaType stype = visitor.getSchemaType();
+ CorbaTypeImpl ctype = visitor.getCorbaType();
+
XmlSchemaElement discriminatorElement = new XmlSchemaElement();
- XmlSchemaType type = TypesUtils.findType(schemas, schema, discriminatorNode);
discriminatorElement.setName(discriminator);
- discriminatorElement.setSchemaTypeName(type.getQName());
+ discriminatorElement.setSchemaTypeName(stype.getQName());
discriminatorElement.setMinOccurs(1);
discriminatorElement.setMaxOccurs(1);
sequence.getItems().add(discriminatorElement);
@@ -104,7 +112,7 @@
+ identifierNode.toString()
+ CorbaConstants.IDL_VERSION);
corbaUnion.setType(unionSchemaComplexType.getQName());
- corbaUnion.setDiscriminator(TypesUtils.findCorbaType(typeMap, type.getQName()).getQName());
+ corbaUnion.setDiscriminator(ctype.getQName());
processCaseNodes(caseNode, newScope, choice, corbaUnion);
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonboundedsequence.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonboundedsequence.wsdl?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonboundedsequence.wsdl (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonboundedsequence.wsdl Wed Nov 15 03:44:53 2006
@@ -94,7 +94,7 @@
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myFloatBoundedSeqSeq" bound="0" repositoryID="IDL:myFloatBoundedSeqSeq:1.0" name="myFloatBoundedSeqSeq" type="ns4:myFloatBoundedSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:double" bound="5" name="_1_myDoubleBoundedSeqSeq" type="ns4:_1_myDoubleBoundedSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myDoubleBoundedSeqSeq" bound="0" repositoryID="IDL:myDoubleBoundedSeqSeq:1.0" name="myDoubleBoundedSeqSeq" type="ns4:myDoubleBoundedSeqSeq" />
- <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:double" bound="5" name="_1_myLongDoubleBoundedSeqSeq" type="ns4:_1_myLongDoubleBoundedSeqSeq" />
+ <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:longdouble" bound="5" name="_1_myLongDoubleBoundedSeqSeq" type="ns4:_1_myLongDoubleBoundedSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myLongDoubleBoundedSeqSeq" bound="0" repositoryID="IDL:myLongDoubleBoundedSeqSeq:1.0" name="myLongDoubleBoundedSeqSeq" type="ns4:myLongDoubleBoundedSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:short" bound="5" name="_1_myShortBoundedSeqSeq" type="ns4:_1_myShortBoundedSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myShortBoundedSeqSeq" bound="0" repositoryID="IDL:myShortBoundedSeqSeq:1.0" name="myShortBoundedSeqSeq" type="ns4:myShortBoundedSeqSeq" />
@@ -110,7 +110,7 @@
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myUnsignedLongLongBoundedSeqSeq" bound="0" repositoryID="IDL:myUnsignedLongLongBoundedSeqSeq:1.0" name="myUnsignedLongLongBoundedSeqSeq" type="ns4:myUnsignedLongLongBoundedSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:char" bound="5" name="_1_myCharBoundedSeqSeq" type="ns4:_1_myCharBoundedSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myCharBoundedSeqSeq" bound="0" repositoryID="IDL:myCharBoundedSeqSeq:1.0" name="myCharBoundedSeqSeq" type="ns4:myCharBoundedSeqSeq" />
- <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:string" bound="5" name="_1_myWcharBoundedSeqSeq" type="ns4:_1_myWcharBoundedSeqSeq" />
+ <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:wchar" bound="5" name="_1_myWcharBoundedSeqSeq" type="ns4:_1_myWcharBoundedSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myWcharBoundedSeqSeq" bound="0" repositoryID="IDL:myWcharBoundedSeqSeq:1.0" name="myWcharBoundedSeqSeq" type="ns4:myWcharBoundedSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="corba:boolean" bound="5" name="_1_myBooleanBoundedSeqSeq" type="ns4:_1_myBooleanBoundedSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonboundedsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonboundedsequence/typemap" elemtype="_1_myBooleanBoundedSeqSeq" bound="0" repositoryID="IDL:myBooleanBoundedSeqSeq:1.0" name="myBooleanBoundedSeqSeq" type="ns4:myBooleanBoundedSeqSeq" />
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonsequence.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonsequence.wsdl?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonsequence.wsdl (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Anonsequence.wsdl Wed Nov 15 03:44:53 2006
@@ -94,7 +94,7 @@
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myFloatSeqSeq" bound="0" repositoryID="IDL:myFloatSeqSeq:1.0" name="myFloatSeqSeq" type="ns4:myFloatSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:double" bound="0" name="_1_myDoubleSeqSeq" type="ns4:_1_myDoubleSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myDoubleSeqSeq" bound="0" repositoryID="IDL:myDoubleSeqSeq:1.0" name="myDoubleSeqSeq" type="ns4:myDoubleSeqSeq" />
- <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:double" bound="0" name="_1_myLongDoubleSeqSeq" type="ns4:_1_myLongDoubleSeqSeq" />
+ <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:longdouble" bound="0" name="_1_myLongDoubleSeqSeq" type="ns4:_1_myLongDoubleSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myLongDoubleSeqSeq" bound="0" repositoryID="IDL:myLongDoubleSeqSeq:1.0" name="myLongDoubleSeqSeq" type="ns4:myLongDoubleSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:short" bound="0" name="_1_myShortSeqSeq" type="ns4:_1_myShortSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myShortSeqSeq" bound="0" repositoryID="IDL:myShortSeqSeq:1.0" name="myShortSeqSeq" type="ns4:myShortSeqSeq" />
@@ -110,7 +110,7 @@
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myUnsignedLongLongSeqSeq" bound="0" repositoryID="IDL:myUnsignedLongLongSeqSeq:1.0" name="myUnsignedLongLongSeqSeq" type="ns4:myUnsignedLongLongSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:char" bound="0" name="_1_myCharSeqSeq" type="ns4:_1_myCharSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myCharSeqSeq" bound="0" repositoryID="IDL:myCharSeqSeq:1.0" name="myCharSeqSeq" type="ns4:myCharSeqSeq" />
- <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:string" bound="0" name="_1_myWcharSeqSeq" type="ns4:_1_myWcharSeqSeq" />
+ <corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:wchar" bound="0" name="_1_myWcharSeqSeq" type="ns4:_1_myWcharSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myWcharSeqSeq" bound="0" repositoryID="IDL:myWcharSeqSeq:1.0" name="myWcharSeqSeq" type="ns4:myWcharSeqSeq" />
<corba:anonsequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="corba:boolean" bound="0" name="_1_myBooleanSeqSeq" type="ns4:_1_myBooleanSeqSeq" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Anonsequence" xmlns="http://schemas.apache.org/yoko/idl/Anonsequence/typemap" elemtype="_1_myBooleanSeqSeq" bound="0" repositoryID="IDL:myBooleanSeqSeq:1.0" name="myBooleanSeqSeq" type="ns4:myBooleanSeqSeq" />
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Primitives.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Primitives.wsdl?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Primitives.wsdl (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Primitives.wsdl Wed Nov 15 03:44:53 2006
@@ -1390,7 +1390,7 @@
</wsdl:operation>
<wsdl:operation name="getWChar">
<corba:operation name="getWChar">
- <corba:param mode="out" name="outWChar" idltype="corba:string" />
+ <corba:param mode="out" name="outWChar" idltype="corba:wchar" />
</corba:operation>
<wsdl:input name="getWCharRequest">
</wsdl:input>
@@ -1399,7 +1399,7 @@
</wsdl:operation>
<wsdl:operation name="setWChar">
<corba:operation name="setWChar">
- <corba:param mode="in" name="inWChar" idltype="corba:string" />
+ <corba:param mode="in" name="inWChar" idltype="corba:wchar" />
</corba:operation>
<wsdl:input name="setWCharRequest">
</wsdl:input>
@@ -1408,7 +1408,7 @@
</wsdl:operation>
<wsdl:operation name="getSetWChar">
<corba:operation name="getSetWChar">
- <corba:param mode="inout" name="inOutWChar" idltype="corba:string" />
+ <corba:param mode="inout" name="inOutWChar" idltype="corba:wchar" />
</corba:operation>
<wsdl:input name="getSetWCharRequest">
</wsdl:input>
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Sequence.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Sequence.wsdl?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Sequence.wsdl (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Sequence.wsdl Wed Nov 15 03:44:53 2006
@@ -29,7 +29,7 @@
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="boundedLongSequence" bound="10" repositoryID="IDL:boundedLongSequenceBoundedSequence:1.0" name="boundedLongSequenceBoundedSequence" type="ns4:boundedLongSequenceBoundedSequence" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:float" bound="0" repositoryID="IDL:myFloat:1.0" name="myFloat" type="ns4:myFloat" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:double" bound="0" repositoryID="IDL:myDouble:1.0" name="myDouble" type="ns4:myDouble" />
- <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:double" bound="0" repositoryID="IDL:myLongDouble:1.0" name="myLongDouble" type="ns4:myLongDouble" />
+ <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:longdouble" bound="0" repositoryID="IDL:myLongDouble:1.0" name="myLongDouble" type="ns4:myLongDouble" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:short" bound="0" repositoryID="IDL:myShort:1.0" name="myShort" type="ns4:myShort" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:long" bound="0" repositoryID="IDL:myLong:1.0" name="myLong" type="ns4:myLong" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:longlong" bound="0" repositoryID="IDL:myLonglong:1.0" name="myLonglong" type="ns4:myLonglong" />
@@ -37,7 +37,7 @@
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:ulong" bound="0" repositoryID="IDL:myUnsignedLong:1.0" name="myUnsignedLong" type="ns4:myUnsignedLong" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:ulonglong" bound="0" repositoryID="IDL:myUnsignedLongLong:1.0" name="myUnsignedLongLong" type="ns4:myUnsignedLongLong" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:char" bound="0" repositoryID="IDL:myChar:1.0" name="myChar" type="ns4:myChar" />
- <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:string" bound="0" repositoryID="IDL:myWchar:1.0" name="myWchar" type="ns4:myWchar" />
+ <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:wchar" bound="0" repositoryID="IDL:myWchar:1.0" name="myWchar" type="ns4:myWchar" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:boolean" bound="0" repositoryID="IDL:myBoolean:1.0" name="myBoolean" type="ns4:myBoolean" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Sequence" xmlns="http://schemas.apache.org/yoko/idl/Sequence/typemap" elemtype="corba:octet" bound="0" repositoryID="IDL:myOctet:1.0" name="myOctet" type="ns4:myOctet" />
</corba:typeMapping>
Modified: incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Typedef.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Typedef.wsdl?view=diff&rev=475208&r1=475207&r2=475208
==============================================================================
--- incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Typedef.wsdl (original)
+++ incubator/yoko/branches/idltowsdl_anon_refactor/tools/src/test/resources/idl/expected_Typedef.wsdl Wed Nov 15 03:44:53 2006
@@ -21,7 +21,7 @@
<corba:typeMapping targetNamespace="http://schemas.apache.org/yoko/idl/Typedef/typemap">
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:float" repositoryID="IDL:myFloat:1.0" name="myFloat" type="xs:float" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:double" repositoryID="IDL:myDouble:1.0" name="myDouble" type="xs:double" />
- <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:double" repositoryID="IDL:myLongDouble:1.0" name="myLongDouble" type="xs:double" />
+ <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:longdouble" repositoryID="IDL:myLongDouble:1.0" name="myLongDouble" type="xs:double" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:short" repositoryID="IDL:myShort:1.0" name="myShort" type="xs:short" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:long" repositoryID="IDL:myLong:1.0" name="myLong" type="xs:int" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:longlong" repositoryID="IDL:myLongLong:1.0" name="myLongLong" type="xs:long" />
@@ -29,7 +29,7 @@
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:ulong" repositoryID="IDL:myUnsignedLong:1.0" name="myUnsignedLong" type="xs:unsignedInt" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:ulonglong" repositoryID="IDL:myUnsignedLongLong:1.0" name="myUnsignedLongLong" type="xs:unsignedLong" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:char" repositoryID="IDL:myChar:1.0" name="myChar" type="xs:byte" />
- <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:string" repositoryID="IDL:myWChar:1.0" name="myWChar" type="xs:string" />
+ <corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:wchar" repositoryID="IDL:myWChar:1.0" name="myWChar" type="xs:string" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:boolean" repositoryID="IDL:myBoolean:1.0" name="myBoolean" type="xs:boolean" />
<corba:alias xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" basetype="corba:octet" repositoryID="IDL:myOctet:1.0" name="myOctet" type="xs:unsignedByte" />
<corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/Typedef" xmlns="http://schemas.apache.org/yoko/idl/Typedef/typemap" elemtype="corba:long" bound="0" repositoryID="IDL:SeqLong:1.0" name="SeqLong" type="ns4:SeqLong" />