You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by su...@apache.org on 2004/06/22 12:34:52 UTC

cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info TypeMap.java

susantha    2004/06/22 03:34:52

  Modified:    c/include/axis/server AxisUserAPI.h TypeMapping.h
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws CUtils.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        ParmHeaderFileWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info TypeMap.java
  Log:
  Applied Adrin's patch to support xml type NMTOKEN
  
  Revision  Changes    Path
  1.14      +6 -1      ws-axis/c/include/axis/server/AxisUserAPI.h
  
  Index: AxisUserAPI.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/AxisUserAPI.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- AxisUserAPI.h	17 Jun 2004 05:34:21 -0000	1.13
  +++ AxisUserAPI.h	22 Jun 2004 10:34:51 -0000	1.14
  @@ -140,7 +140,11 @@
    * Axis C++ defined type for xml basic type anyURI
    */
   typedef AxisChar * xsd__anyURI;
  -
  +/**
  + * @typedef xsd__NMTOKEN
  + * Axis C++ defined type for xml basic type anyURI
  + */
  +typedef AxisChar * xsd__NMTOKEN;
   /**
    * @enum AXIS_BINDING_STYLE
    * Enumeration for the different wsdl styles. This is used by the Axis
  @@ -177,6 +181,7 @@
   typedef AXIS_DEFINED_ARRAY(xsd__base64Binary) xsd__base64Binary_Array;
   typedef AXIS_DEFINED_ARRAY(xsd__hexBinary) xsd__hexBinary_Array;
   typedef AXIS_DEFINED_ARRAY(xsd__anyURI) xsd__anyURI_Array;
  +typedef AXIS_DEFINED_ARRAY(xsd__NMTOKEN) xsd__NMTOKEN_Array;
    
   #define AXIS_OUT_PARAM 
   
  
  
  
  1.13      +1 -1      ws-axis/c/include/axis/server/TypeMapping.h
  
  Index: TypeMapping.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/TypeMapping.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TypeMapping.h	13 Jun 2004 11:26:59 -0000	1.12
  +++ TypeMapping.h	22 Jun 2004 10:34:51 -0000	1.13
  @@ -35,7 +35,7 @@
                   XSD_MONTH, XSD_HEXBINARY, \
                   XSD_BASE64BINARY, XSD_ANYURI, XSD_QNAME, XSD_NOTATION, \
                   XSD_INTEGER, \
  -                XSD_ARRAY, USER_TYPE, ACCESSOR, XSD_ANY
  +                XSD_ARRAY, USER_TYPE, ACCESSOR, XSD_NMTOKEN, XSD_ANY
   } XSDTYPE;
   
   #ifdef __cplusplus
  
  
  
  1.18      +5 -0      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java
  
  Index: CUtils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- CUtils.java	12 Jun 2004 03:57:11 -0000	1.17
  +++ CUtils.java	22 Jun 2004 10:34:52 -0000	1.18
  @@ -73,6 +73,7 @@
   		class2QNamemap.put("xsd__unsignedLong", new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedLong"));
   		class2QNamemap.put("xsd__unsignedShort", new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedShort"));
   		class2QNamemap.put("xsd__QName", new QName(WrapperConstants.SCHEMA_NAMESPACE, "QName"));
  +		class2QNamemap.put("xsd__NMTOKEN", new QName(WrapperConstants.SCHEMA_NAMESPACE,"NMTOKEN"));
   		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "int"), "int");
   		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "byte"), "unsigned char");
   		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "float"), "float");
  @@ -95,6 +96,7 @@
   		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedLong"), "xsd__unsignedLong");
   		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedShort"), "xsd__unsignedShort");
   		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "QName"), "xsd__QName");
  +		qname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "NMTOKEN"), "xsd__NMTOKEN");
   		
   		/* TODO:
   		 *   Should be removed when the following issue will be fixed :
  @@ -149,6 +151,7 @@
   		type2getValueMethodName.put("xsd__boolean","Boolean");
   		type2getValueMethodName.put("xsd__anyURI","String");
   		type2getValueMethodName.put("xsd__QName","String");
  +		type2getValueMethodName.put("xsd__NMTOKEN","String");
   		type2BasicArrayName.put("int","xsd__int_Array");
   		type2BasicArrayName.put("float","xsd__float_Array");
   		type2BasicArrayName.put("xsd__string","xsd__string_Array");
  @@ -169,6 +172,7 @@
   		type2BasicArrayName.put("xsd__boolean","xsd__boolean_Array");
   		type2BasicArrayName.put("xsd__anyURI","xsd__anyURI_Array");
   		type2BasicArrayName.put("xsd__QName","xsd__QName_Array");
  +		type2BasicArrayName.put("xsd__NMTOKEN","xsd__NMTOKEN_Array");
   		basicType2EnumMap.put("int","XSD_INT");
   		basicType2EnumMap.put("float","XSD_FLOAT");
   		basicType2EnumMap.put("xsd__string","XSD_STRING");
  @@ -189,6 +193,7 @@
   		basicType2EnumMap.put("xsd__boolean","XSD_BOOLEAN");
   		basicType2EnumMap.put("xsd__anyURI","XSD_ANYURI");
   		basicType2EnumMap.put("xsd__QName","XSD_QNAME");
  +		basicType2EnumMap.put("xsd__NMTOKEN","XSD_NMTOKEN");
   	}
   	
   	public static void addSchemaDefinedSimpleType(QName qname, String type){
  
  
  
  1.13      +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java
  
  Index: ParmHeaderFileWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ParmHeaderFileWriter.java	11 Jun 2004 05:01:28 -0000	1.12
  +++ ParmHeaderFileWriter.java	22 Jun 2004 10:34:52 -0000	1.13
  @@ -79,7 +79,7 @@
   			if (!CUtils.isSimpleType(baseType)) return;
   			String langTypeName = CUtils.getclass4qname(baseType);
   			writer.write("typedef ");
  -			if ("string".equals(baseType.getLocalPart())){
  +			if ("string".equals(baseType.getLocalPart()) || "NMTOKEN".equals(baseType.getLocalPart())){
   				writer.write(langTypeName + " " + classname + ";\n");
   				for(int i=1; i<restrictionData.size();i++){
   					QName value = (QName)restrictionData.elementAt(i);
  
  
  
  1.11      +3 -0      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/TypeMap.java
  
  Index: TypeMap.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/TypeMap.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TypeMap.java	9 Apr 2004 08:49:34 -0000	1.10
  +++ TypeMap.java	22 Jun 2004 10:34:52 -0000	1.11
  @@ -81,6 +81,7 @@
   		basicTypeClass2QNamemap.put("xsd__unsignedLong", new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedLong"));
   		basicTypeClass2QNamemap.put("xsd__unsignedShort", new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedShort"));
   		basicTypeClass2QNamemap.put("xsd__anyURI", new QName(WrapperConstants.SCHEMA_NAMESPACE, "anyURI"));
  +		basicTypeClass2QNamemap.put("xsd__NMTOKEN", new QName(WrapperConstants.SCHEMA_NAMESPACE, "NMTOKEN"));
   		
   		// xml -> c type mapping 
   	
  @@ -105,6 +106,7 @@
   		basicTypeQname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedLong"), "xsd__unsignedLong");
   		basicTypeQname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "unsignedShort"), "xsd__unsignedShort");
   		basicTypeQname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "anyURI"), "xsd__anyURI");
  +		basicTypeQname2classmap.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "NMTOKEN"),"xsd__NMTOKEN");
   		
   		/* TODO:
   		 *   Should be removed when the following issue will be fixed :
  @@ -131,6 +133,7 @@
   		basicTypeQname2classmap.put(new QName(WrapperConstants.SOAPENC_NAMESPACE, "unsignedLong"), "xsd__unsignedLong");
   		basicTypeQname2classmap.put(new QName(WrapperConstants.SOAPENC_NAMESPACE, "unsignedShort"), "xsd__unsignedShort");
   		basicTypeQname2classmap.put(new QName(WrapperConstants.SOAPENC_NAMESPACE, "anyURI"), "xsd__anyURI");
  +		basicTypeQname2classmap.put(new QName(WrapperConstants.SOAPENC_NAMESPACE, "NMTOKEN"), "xsd__NMTOKEN");
   		/* TODO:
   		 *  Another strange issue from Axis 1.1 runtime when base64binary is in input/output operations.
   		 */