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 "Rost Vashevnik (JIRA)" <ji...@apache.org> on 2008/07/07 04:15:31 UTC

[jira] Created: (AXIS2-3896) Bug with naming of the schema files. Results in schema writer overwriting schema files.

Bug with naming of the schema files. Results in schema writer overwriting schema files.
---------------------------------------------------------------------------------------

                 Key: AXIS2-3896
                 URL: https://issues.apache.org/jira/browse/AXIS2-3896
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.4
         Environment: Tomcat 5.5.9, Windows XP, Java 1.5
            Reporter: Rost Vashevnik


I am using WSDL2Java in a way when it uses original WSDL.

My WSDL file has imported shemas, so WSDL2Java attempts to read them and then write them to target location. 

In the process org.apache.axis2.description.AxisService decides to rename shema files and give them extensions xsd0, xsd1, xsd2,....etc (see insertIntoNameTable() method of org.apache.axis2.description.AxisService class). I understand that this is to prevent file name clashes when schema locations are flattened in one directory. This is a good idea.

Unfortunately, during actual writing (see method writeSchema() in org.apache.axis2.wsdl.codegen.writer.SchemaWriter class - the generated file extensions are lost and overwritten with constant '.xsd' extension.

This causes problem for me as my schema files have same names (but originally residing in different directories). I believe this is just a bug and have fixed it on my local copy. 

I am attaching modified SchemaWriter.java. Look for 'CHANGE BY METABOSS' comment. It has origial code commented out and the change code inserted.

Thank you

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-3896) Bug with naming of the schema files. Results in schema writer overwriting schema files.

Posted by "Rost Vashevnik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rost Vashevnik updated AXIS2-3896:
----------------------------------

    Attachment: SchemaWriter.java

Look for CHANGE BY METABOSS comment for the change

> Bug with naming of the schema files. Results in schema writer overwriting schema files.
> ---------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3896
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3896
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4
>         Environment: Tomcat 5.5.9, Windows XP, Java 1.5
>            Reporter: Rost Vashevnik
>         Attachments: SchemaWriter.java
>
>
> I am using WSDL2Java in a way when it uses original WSDL.
> My WSDL file has imported shemas, so WSDL2Java attempts to read them and then write them to target location. 
> In the process org.apache.axis2.description.AxisService decides to rename shema files and give them extensions xsd0, xsd1, xsd2,....etc (see insertIntoNameTable() method of org.apache.axis2.description.AxisService class). I understand that this is to prevent file name clashes when schema locations are flattened in one directory. This is a good idea.
> Unfortunately, during actual writing (see method writeSchema() in org.apache.axis2.wsdl.codegen.writer.SchemaWriter class - the generated file extensions are lost and overwritten with constant '.xsd' extension.
> This causes problem for me as my schema files have same names (but originally residing in different directories). I believe this is just a bug and have fixed it on my local copy. 
> I am attaching modified SchemaWriter.java. Look for 'CHANGE BY METABOSS' comment. It has origial code commented out and the change code inserted.
> Thank you

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (AXIS2-3896) Bug with naming of the schema files. Results in schema writer overwriting schema files.

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-3896:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> Bug with naming of the schema files. Results in schema writer overwriting schema files.
> ---------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3896
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3896
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4
>         Environment: Tomcat 5.5.9, Windows XP, Java 1.5
>            Reporter: Rost Vashevnik
>            Assignee: Amila Chinthaka Suriarachchi
>         Attachments: SchemaWriter.java
>
>
> I am using WSDL2Java in a way when it uses original WSDL.
> My WSDL file has imported shemas, so WSDL2Java attempts to read them and then write them to target location. 
> In the process org.apache.axis2.description.AxisService decides to rename shema files and give them extensions xsd0, xsd1, xsd2,....etc (see insertIntoNameTable() method of org.apache.axis2.description.AxisService class). I understand that this is to prevent file name clashes when schema locations are flattened in one directory. This is a good idea.
> Unfortunately, during actual writing (see method writeSchema() in org.apache.axis2.wsdl.codegen.writer.SchemaWriter class - the generated file extensions are lost and overwritten with constant '.xsd' extension.
> This causes problem for me as my schema files have same names (but originally residing in different directories). I believe this is just a bug and have fixed it on my local copy. 
> I am attaching modified SchemaWriter.java. Look for 'CHANGE BY METABOSS' comment. It has origial code commented out and the change code inserted.
> Thank you

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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