You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Nadir Amra <am...@us.ibm.com> on 2006/07/21 06:10:45 UTC

TypeMap processing

I have changed and committed code so that one can tell whether to generate 
a TypeMap entry by simply calling method isExternalized().   Basically by 
default all types that are not anonymous types are externalized.  To 
externalize anonymous types another method is called.  So there is no 
place in the code where it looks for '>' in an object of class Type.

I have run the test buckets and things look good.  One thing though.  In 
AllParamWriter.writeSource(), as it iterates through the TypeMap, the code 
is as follows:

                type = (Type) types.next();
                if (type.isArray())
                { ... }
                else if (type.isAnonymous() && !type.isExternalized())
                {
                    if(WSDL2Ws.verbose)
                        System.out.println("ignoring anonymous type " + 
type.getLanguageSpecificName() + "\n");
                }
                else
                {
                    if (WSDL2Ws.verbose)
                        System.out.println("struct writer called 
for......" + type.getName());

                    (new BeanParamWriter(wscontext, type)).writeSource();
                    (new ParmHeaderFileWriter(wscontext, 
type)).writeSource();
                }

I see no reason why I should not change the logic to:


                if (!type.isExternalized())
                {
                    if(WSDL2Ws.verbose)
                        System.out.println("ignoring anonymous type " + 
type.getLanguageSpecificName() + "\n");
                }
                else if (type.isArray())
                { ... }
                else
                {
                    if (WSDL2Ws.verbose)
                        System.out.println("struct writer called 
for......" + type.getName());

                    (new BeanParamWriter(wscontext, type)).writeSource();
                    (new ParmHeaderFileWriter(wscontext, 
type)).writeSource();
                }

And in fact I have changed it in code that I have and ran the test bucket 
with no problems.  I just want to make sure I am not missing something 
before I commit it.


Nadir K. Amra


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: TypeMap processing

Posted by John Hawkins <HA...@uk.ibm.com>.
As long as the test buckets works we're good to go :-)




Nadir Amra <am...@us.ibm.com> 
21/07/2006 05:10
Please respond to
"Apache AXIS C Developers List" <ax...@ws.apache.org>


To
"Apache AXIS C Developers List" <ax...@ws.apache.org>
cc

Subject
TypeMap processing






I have changed and committed code so that one can tell whether to generate 

a TypeMap entry by simply calling method isExternalized().   Basically by 
default all types that are not anonymous types are externalized.  To 
externalize anonymous types another method is called.  So there is no 
place in the code where it looks for '>' in an object of class Type.

I have run the test buckets and things look good.  One thing though.  In 
AllParamWriter.writeSource(), as it iterates through the TypeMap, the code 

is as follows:

                type = (Type) types.next();
                if (type.isArray())
                { ... }
                else if (type.isAnonymous() && !type.isExternalized())
                {
                    if(WSDL2Ws.verbose)
                        System.out.println("ignoring anonymous type " + 
type.getLanguageSpecificName() + "\n");
                }
                else
                {
                    if (WSDL2Ws.verbose)
                        System.out.println("struct writer called 
for......" + type.getName());

                    (new BeanParamWriter(wscontext, type)).writeSource();
                    (new ParmHeaderFileWriter(wscontext, 
type)).writeSource();
                }

I see no reason why I should not change the logic to:


                if (!type.isExternalized())
                {
                    if(WSDL2Ws.verbose)
                        System.out.println("ignoring anonymous type " + 
type.getLanguageSpecificName() + "\n");
                }
                else if (type.isArray())
                { ... }
                else
                {
                    if (WSDL2Ws.verbose)
                        System.out.println("struct writer called 
for......" + type.getName());

                    (new BeanParamWriter(wscontext, type)).writeSource();
                    (new ParmHeaderFileWriter(wscontext, 
type)).writeSource();
                }

And in fact I have changed it in code that I have and ran the test bucket 
with no problems.  I just want to make sure I am not missing something 
before I commit it.


Nadir K. Amra


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org