axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal BeanParamWriter.java
Date Mon, 30 Aug 2004 05:39:40 GMT
samisa      2004/08/29 22:39:40

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        BeanParamWriter.java
  Log:
  Solved the _Ref post fix and _ prefix problems
  PR: AXISCPP-142
  
  Revision  Changes    Path
  1.26      +27 -4     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
  
  Index: BeanParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- BeanParamWriter.java	27 Aug 2004 15:23:45 -0000	1.25
  +++ BeanParamWriter.java	30 Aug 2004 05:39:40 -0000	1.26
  @@ -129,8 +129,17 @@
   				throw new WrapperFault("Error : an attribute is not basic type");
   			}
   			else{
  +				//Samisa
  +				//remove _Ref sufix and _ prefix in SOAP tag name
  +				String soapTagName = attribs[i].getParamName();
  +				if( soapTagName.lastIndexOf("_Ref") > -1 )
  +					soapTagName = soapTagName.substring(0, soapTagName.lastIndexOf("_Ref") );
  +				if( soapTagName.charAt(0) == '_' )
  +					soapTagName = soapTagName.substring(1, soapTagName.length() );
  +				//end remove _Ref sufix and _ prefix in SOAP tag name
   				writer.write("\tif (0 != param->"+attribs[i].getParamName()+")\n");
  -				writer.write("\t\tpSZ->serializeAsAttribute(\""+attribs[i].getParamName()+"\", 0,
(void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
			
  +				//writer.write("\t\tpSZ->serializeAsAttribute(\""+attribs[i].getParamName()+"\",
0, (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
			
  +				writer.write("\t\tpSZ->serializeAsAttribute(\""+ soapTagName +"\", 0, (void*)&(param->"+attribs[i].getParamName()+"),
"+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");				
   				if (!attribs[i].isOptional()){
   					/* This avoid segmentation fault at runtime */
   					/*writer.write("\telse\n");
  @@ -218,14 +227,28 @@
   			}else if(attribs[i].isSimpleType()){
   				//TODO handle optional attributes
   				//Samisa
  -				//writer.write("\tparam->"+attribs[i].getParamName()+" = pIWSDZ->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),
attribs[i].isAttribute())+"(\""+(attribs[i].isAttribute() ? attribs[i].getParamName():attribs[i].getElementName().getLocalPart())+"\",0);\n");
  -				writer.write("\tparam->"+attribs[i].getParamName()+" = pIWSDZ->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),
attribs[i].isAttribute())+"(\""+(attribs[i].isAttribute() ? attribs[i].getParamName():attribs[i].getElementNameAsString())+"\",0);\n");
  +				//remove _Ref sufix and _ prefix in SOAP tag name
  +				String soapTagName = (attribs[i].isAttribute() ? attribs[i].getParamName():attribs[i].getElementNameAsString());
  +				if( soapTagName.lastIndexOf("_Ref") > -1 )
  +					soapTagName = soapTagName.substring(0, soapTagName.lastIndexOf("_Ref") );
  +				if( soapTagName.charAt(0) == '_' )
  +					soapTagName = soapTagName.substring(1, soapTagName.length() );
  +				//end remove _Ref sufix and _ prefix in SOAP tag name
  +				writer.write("\tparam->"+attribs[i].getParamName()+" = pIWSDZ->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),
attribs[i].isAttribute())+"(\""+ soapTagName +"\",0);\n");
   				//Samisa
   			} else{
   				//if complex type
  +				//Samisa
  +				//remove _Ref sufix and _ prefix in SOAP tag name
  +				String soapTagName = attribs[i].getParamName();
  +				if( soapTagName.lastIndexOf("_Ref") > -1 )
  +					soapTagName = soapTagName.substring(0, soapTagName.lastIndexOf("_Ref") );
  +				if( soapTagName.charAt(0) == '_' )
  +					soapTagName = soapTagName.substring(1, soapTagName.length() );
  +				//end remove _Ref sufix and _ prefix in SOAP tag name
   				writer.write("\tparam->"+attribs[i].getParamName()+" = ("+attribs[i].getTypeName()+"*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_"+attribs[i].getTypeName()+
   					"\n\t\t, (void*)Axis_Create_"+attribs[i].getTypeName()+", (void*)Axis_Delete_"+attribs[i].getTypeName()+
  -					"\n\t\t, \""+attribs[i].getParamName()+"\", Axis_URI_"+attribs[i].getTypeName()+");\n");
			
  +					"\n\t\t, \""+ soapTagName +"\", Axis_URI_"+attribs[i].getTypeName()+");\n");				
   			}		
   		}
   		if (extensionBaseAttrib != null){
  
  
  

Mime
View raw message