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 ba...@apache.org on 2004/04/05 13:38:08 UTC
cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws ParamWriter.java
baudyjy 2004/04/05 04:38:08
Modified: c/src/wsdl/org/apache/axis/wsdl/wsdl2ws ParamWriter.java
Log:
Fix complex schemas compilation (include cycle).
Revision Changes Path
1.7 +19 -0 ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java
Index: ParamWriter.java
===================================================================
RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ParamWriter.java 17 Feb 2004 12:47:44 -0000 1.6
+++ ParamWriter.java 5 Apr 2004 11:38:08 -0000 1.7
@@ -195,5 +195,24 @@
return attrib.getTypeName();
}
}
+
+ /* This is a must for complex wsdl file (cycle in includes)*/
+ protected String getCHeaderFileCorrectParmNameConsideringArraysAndComplexTypes(AttributeInfo attrib)throws WrapperFault{
+ if (attrib.isArray()){
+ if (attrib.isSimpleType())
+ return CUtils.getBasicArrayNameforType(attrib.getTypeName());
+ else
+ return "struct " +CUtils.getCmplxArrayNameforType(attrib.getSchemaName())+"Tag";
+ }
+ else if (!attrib.isSimpleType()){
+ return "struct " +attrib.getTypeName()+"Tag *";
+ }else{
+ if (attrib.isAttribute() && attrib.isOptional()){ //variables corresponding to optional attributes are pointer types
+ return attrib.getTypeName()+" *";
+ }
+ else
+ return attrib.getTypeName();
+ }
+ }
}