axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milinda Lakmal Pathirage (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2C-425) "org.apache.axiom.om.OMElement" inside generated C code using WSDL2C(Java Version) tool
Date Thu, 23 Nov 2006 03:17:02 GMT
    [ http://issues.apache.org/jira/browse/AXIS2C-425?page=comments#action_12452102 ] 
            
Milinda Lakmal Pathirage commented on AXIS2C-425:
-------------------------------------------------

This JIRA is about the code generation component. Sorry for the mistake.

I figured out that this error occur, because there are language specific DEFAULT_CLASS_NAME,
DEFAULT_CLASS_ARRAY_NAME, DEFAULT_ATTRIB_CLASS_NAME and DEFAULT_ATTRIB_ARRAY_CLASS_NAME final
Strings are declared inside the org.apache.axis2.schema.SchemaCompiler.


To avoid this error I propose to remove these language specific things from the SchemaCompiler
and include them in the BeanWriter interface implementations. Also we have to introduce new
methods to the BeanWriter interface to make sure that every implementation of BeanWriter interface
have these default things.


Extra methods to BeanWriter interface:

public String getDefaultClassName();

public String getDefaultClassArrayName();

public String getDefaultAttribClassName();

public String getDefaultAttribArrayClassName();


Example implementations inside implementations:


For C code generation (CStructWriter)

public static final String DEFAULT_CLASS_NAME = "axiom_node_t*";

public static final String DEFAULT_CLASS_ARRAY_NAME = "axis2_array_list_t";


public static final String DEFAULT_ATTRIB_CLASS_NAME = "axiom_attribute_t*";

public static final String DEFAULT_ATTRIB_ARRAY_CLASS_NAME = "axis2_array_list_t";

public String getDefaultClassName() {

return DEFAULT_CLASS_NAME;

}


public String getDefaultClassArrayName() {

return DEFAULT_CLASS_ARRAY_NAME;

}


public String getDefaultAttribClassName() {

return DEFAULT_ATTRIB_CLASS_NAME;

}


public String getDefaultAttribArrayClassName() {

return DEFAULT_ATTRIB_ARRAY_CLASS_NAME;

}


And inside the SchemaCompiler we have to use writer.getDefaultClassName() instead SchemaCompiler.
DEFAULT_CLASS_NAME (same for others). Also inside CstructWriter and JavaBeanWriter we have
to replace SchemaCompiler. DEFAULT_CLASS_NAME with getDefaultClassName().
We have to so same for other things like DEFAULT_ATTRIB_ARRAY_CLASS_NAME.



> "org.apache.axiom.om.OMElement" inside generated C code using WSDL2C(Java Version) tool
> ---------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-425
>                 URL: http://issues.apache.org/jira/browse/AXIS2C-425
>             Project: Axis2-C
>          Issue Type: Bug
>            Reporter: Milinda Lakmal Pathirage
>
> When I use Axis2 Java Code Generation tool to generate server side code for DataHandlerService.wsdl
(see the attachment) with data binding
> *adb*, it generates code that has Java Default Class name inside some C source and header
file which cause some compilation errors.
> Example:
> struct axis2_echoContent_impl
> {
> axis2_echoContent_t echoContent;
> axis2_qname_t* qname;
> org.apache.axiom.om.OMElement attrib_arg_0_2;
> };
> /**
> * setter for arg_0_2
> */
> axis2_status_t AXIS2_CALL
> axis2_echoContent_set_arg_0_2(
> axis2_echoContent_t* echoContent,
> const axis2_env_t *env,
> org.apache.axiom.om.OMElement param_arg_0_2);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message