This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 115502 - I18N - encoding of file->new->soa xml files to use feq and be seeded with project encoding.
Summary: I18N - encoding of file->new->soa xml files to use feq and be seeded with pro...
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Project (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-09-14 01:09 UTC by Ken Frank
Modified: 2007-11-30 13:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
wsdl_from_db (148.20 KB, image/jpeg)
2007-10-19 00:24 UTC, kaa
Details
utf image where mbyte is ok (148.73 KB, image/gif)
2007-10-30 03:39 UTC, Ken Frank
Details
where bpel mbyte is not ok in euc proj enc (124.52 KB, image/gif)
2007-10-30 03:39 UTC, Ken Frank
Details
square boxes (85.04 KB, text/plain)
2007-11-08 18:50 UTC, kaa
Details
square boxes (correct MIME type) (85.04 KB, image/jpeg)
2007-11-08 18:52 UTC, kaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2007-09-14 01:09:54 UTC
please file related issues as needed.

based on new project and file encoding features for nb6, jsp, html and now certain specific xml files (see 114683)
use the file feq implementation and also seed (via templates) - new files with encoding value of the project,
not UTF-8 as is done now.

the files that would need this are from file->new->soa

bpel process, wsdl from dbase, xslt service
(sql file and feq is a separate file type that was already filed before)

NOTE - there is a concern at this late date of any potential destabilization while at same time
wanting to have consistency with other parts of nb as to encoding handling. (and of impact to any other
files/processes that would interface with these files.

I'll send other info on this to alias and suggest that other dev are consulted to decide if to do it.
Comment 1 Ken Frank 2007-09-30 19:31:35 UTC
please let us know if this will be done soon; this will require retesting due to this change
compared to how it is now.

ken.frank@sun.com
Comment 2 Venkat Chellasamy 2007-10-11 20:28:39 UTC
This is an umbrella issue for modules in new->file->soa.
we will fix this for fcs.

sergey, can you start with bpel and xslt and move the ticket to venkats for sql
Comment 3 Sergey Lunegov 2007-10-12 11:30:35 UTC
Vladimir, please look at this.
Comment 4 Vladimir Yaroslavskiy 2007-10-12 12:57:23 UTC
Done for BPEL in trunk and sierra:

1. org\netbeans\modules\bpel\core\resources\templates\EmptyBPEL.template:
   removed /encoding="UTF-8"/ from first line.
2. org\netbeans\modules\bpel\core\wizard\NewBpelFileIterator.java:
   added in method instantiate:
   ...
   encoding = EncodingUtil.getProjectEncoding(df.getPrimaryFile());
   if(!EncodingUtil.isValidEncoding(encoding)) {
     encoding = "UTF-8"; //NOI18N
   }
   EditCookie edit = dobj.getCookie(EditCookie.class);
   if (edit != null) {
     EditorCookie editorCookie = dobj.getCookie(EditorCookie.class);
     Document doc = (Document)editorCookie.openDocument();
     fixEncoding(doc, encoding);
     SaveCookie save = dobj.getCookie(SaveCookie.class);
     if (save != null) {
       save.save();
     }
   }

Vitaly, please do changes for XSLT and after that please reassign issue for sql.

For SQL team: SQL File and WSDL from Database
Comment 5 Vitaly Bychkov 2007-10-12 19:31:50 UTC
Done for xslt,
fixed in trunk:
/cvs/enterprise/xslt/tmap/src/org/netbeans/modules/xslt/tmap/resources/TMapTemplate.xml,v  <--  TMapTemplate.xml
new revision: 1.5; previous revision: 1.4

/cvs/enterprise/xslt/tmap/src/org/netbeans/modules/xslt/tmap/util/Util.java,v  <--  Util.java
new revision: 1.5; previous revision: 1.4


/cvs/enterprise/xslt/tmap/nbproject/project.xml,v  <--  project.xml
new revision: 1.8; previous revision: 1.7



/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/wizard/element/Iterator.java,v  <--  Iterator.java
new revision: 1.27; previous revision: 1.26

/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/XsltproProjectGenerator.java,v  <-- 
XsltproProjectGenerator.java
new revision: 1.17; previous revision: 1.16

/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/wizard/NewXsltproProjectWizardIterator.java,v  <-- 
NewXsltproProjectWizardIterator.java
new revision: 1.5; previous revision: 1.4

/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/resources/empty_xslt_service.xsl,v  <-- 
empty_xslt_service.xsl
new revision: 1.3; previous revision: 1.2





vchellasamy please do changes for SQL File and WSDL from Database.
Comment 6 Venkat Srinivasan 2007-10-16 08:06:06 UTC
Pls look into this.
Comment 7 Radhika Maddula 2007-10-17 12:23:43 UTC
I am not clear of this issue to proceed with ? Can you please give more clarification to proceed further. 
Comment 8 kaa 2007-10-19 00:18:33 UTC
I tried to verify parts of this issue (build 1016 XP.ja_JP, project encodings: UTF-8 and Win31j) with Bpel Module.
Results: xml, xsl, xsd, wsdl files have thier encodings the same as the project encoding.


Couldn't check:
1. Using win31j encoding:
   Couldn't create BPEL process, source is empty (exactly 111955, see its description: it was seen time to time ).   
2. wsdl from db has square boxes (see image, but there was an exception 118769)
   Also was created table_code.xsd file with UTF-8 in it.
Comment 9 kaa 2007-10-19 00:24:32 UTC
Created attachment 51256 [details]
wsdl_from_db
Comment 10 kaa 2007-10-19 00:30:29 UTC
3. encoding property was not implemented in 1016.
Comment 11 kaa 2007-10-19 00:38:32 UTC
item 3 from above is about sql files
Comment 12 Ken Frank 2007-10-19 02:46:40 UTC
Andrey,

thanks for confirming about the fixed parts; we will verify others after that part is done

2 questions:

in the image, what kind of item does the thing with square boxes represent ?
is it some item added to the wsdl from a pallette ?
I think that is something separate from this issue; please file a separate
issue.  (and I think its separate from 118769 )

and if 111955 is still seen, even please reopen it since last comment in issue says its ok now.

ken.frank@sun.com

 

Comment 13 Pavan Veeravarapu 2007-10-23 07:02:35 UTC
Completed for SQL File and WSDL from Database
Comment 14 Ken Frank 2007-10-25 20:25:16 UTC
for the sql file, since it does not have encoding tag like the xml based files,
do you know how it could be checked to see that its using encoding of the project,
and not that of just utf-8 ?

ken.frank@sun.com
Comment 15 Ken Frank 2007-10-30 03:36:27 UTC
I don't see encoding tag at all in bpel and xslt files so am reopening this.

and that might be why the multibyte in bpel file is not ok
if project encoding is not utf-8.

this looks like an issue from a long time ago when there were encoding
problems, before this issue of seeding with encoding was done.

and when manually add the encoding to bpel file of euc-jp, for ja solaris locale,
then save and close - it wipes out most of the file and when reopen most of the file is
not there.

since the xslt template file does not have encoding value either, am assuming there 
would be problems with it too - please use other locale and project encodings to emulate this.

attached are 2 gifs showing how the mbyte in project/file name looks when project in 
utf-8 project encoding and euc-jp encoding (in both cases user is in ja locale
)

Comment 16 Ken Frank 2007-10-30 03:39:13 UTC
Created attachment 51962 [details]
utf image where mbyte is ok
Comment 17 Ken Frank 2007-10-30 03:39:48 UTC
Created attachment 51963 [details]
where bpel mbyte is not ok in euc proj enc
Comment 18 Vladimir Yaroslavskiy 2007-10-30 14:43:36 UTC
Ken,

Could you please provide *detailed* steps to reproduce?
As for me, I can't understand what is wrong and how
to reproduce it.

From my point of view, I've fixed the BPEL part of
issue: when user creates bpel process in bpel modules,
encoding in bpel file must be taken from project.

Now I can see: create bpel module, change encoding
from default utf-8 to e.g. x-euc-jp-linux, create
bpel process, open it in source view, see that
the file has encoding="x-euc-jp-linux". Ok.
What doesn't work?

Please also provide the name of operating system to
reproduce. Setting INCOMPLETE...
Comment 19 Ken Frank 2007-10-30 15:11:56 UTC
answers

1. assumption is that new wsdl and new xslt need to have encoding tag seeded in
it - that was what was supposed to happen with this issue.

2. but open the templates for these files - there is no indication of encoding tag
that would be put into real file based on users project encoding prop.

3. create real wsdl and xslt
there is no encoding tag

that is why this was reopened.

ken.frank@sun.com
Comment 20 Ken Frank 2007-10-30 15:53:51 UTC
Vladimir,

this issue was done in parts it seems so that the bpel part was not the only
part done; it was handed to others to do those parts
and its some other parts that dont have the encoding value in their xml files
of that file type, as I mentioned in prev comment below.

ken.frank@sun.com
Comment 21 Vitaly Bychkov 2007-10-30 16:31:03 UTC
Ken I've added for bpel and xslt files notification in case if there is problem with setting encoding.

Could you try the last build and in case any error notifications place it here.
Comment 22 Ken Frank 2007-10-30 18:04:09 UTC
lativ,

for comments
Ken I've added for bpel and xslt files notification in case if there is problem with setting encoding.

Could you try the last build and in case any error notifications place it here.

--> for the xslt, there is no encoding tag in new xslt or in its template; and its true
for wsdl and thats why this issue was reopened.

is the notiifcation you mention related that ?
or is it about user changing encoding tag to one that might not be valid ?

ken.frank@sun.com
Comment 23 Vitaly Bychkov 2007-10-31 08:38:26 UTC
Ken,
Did you use XSLT or Bpel project for new XSLT service ?

There is an error - XSLT service should be available just in context of XSLT project.

Could you please provide detailed steps to reproduce. (i.e. What kind of project, what build  e.c. did you use.)
Comment 24 Vitaly Bychkov 2007-10-31 08:48:00 UTC
Ken could you give a tip where one can get the latest multylanguage build ?
Comment 25 Vladimir Yaroslavskiy 2007-10-31 12:52:06 UTC
Set INCOMPLETE and waiting link to the latest multilanguage build.
Comment 26 Ken Frank 2007-10-31 16:52:34 UTC
Vladimir and Lativ,

The actual ml build is in progress; we use pseudo localized build
which I can send you.

But since this is just about seeding of new wsdl and xslt files,
that is not related to ml build; that can affect any user in any locale.

you can try it yourself on nb, even in en locale - just change the project
encoding prop to something else than utf-8 -then create a new project and then
create a new file and you can see that encoding is not seeded
with the encoding you chose.

but create a new jsp file or html file, and you will see that it is seeded
with the encoding value you chose.

ken.frank@sun.com


or is there something in some bundle file of pseudo translated that
Comment 27 Sergey Lunegov 2007-10-31 16:59:26 UTC
Hi Ken,

is the issue reproducible when you create XSLTservice from XSLT project ?
Not from BPEL project, not from any other project.
Comment 28 Ken Frank 2007-10-31 17:10:53 UTC
Hi Ken,

is the issue reproducible when you create XSLTservice from XSLT project ?
Not from BPEL project, not from any other project.

I realized that I must have been doing the other 
xslt, since I don't know how to create the xslt service
(person who normally tests it out of town)

But as per my other comments, its easy for those on
your team to test; it does not need pseudo localized.

and if I look in the templates->soa section, I don't see encoding
notation in any of those template files in any case.


QUESTION - isnt having the files created with encoding tag part of this issue ?
Maybe I am mistaken here.

ALSO, if that is part of this, its very late in cycle for this and am concerned 
about any possible instability, but also want to make sure that soa things
are compatible with other parts of product as to feq and encoding.

Thanks - Ken

Comment 29 Vladimir Yaroslavskiy 2007-11-01 12:34:25 UTC
Hi Ken,

I took the latest NetBeans autobuild (>= #4245),
created BPEL module, changed encoding from UTF-8 to EUC-JP,
created BPEL process: the encoding of the process is "EUC-JP".

The same with XSLT module: changed encoding to EUC-JP,
created XSLT service, the encoding of the service is "EUC-JP".

Please, do the same with the *latest* NetBeans build (>= *2007-11-02*)
and verify that the behaviour is ok.
Comment 30 Sergey Lunegov 2007-11-01 12:37:56 UTC
Ken, 
one more comment. If it doesn't work for you please provide exact steps
how to reproduce it. Looks like you use different scenario.
Comment 31 Ken Frank 2007-11-04 04:47:15 UTC
bpel files and xslt files (created from xslt project and using wsdl files)
and wsdl files appear to have encoding in them based on project encoding.

1. next steps as per 121004 is to verify these
and other xml based files using
non ascii, since even though
encoding tag is that of the project,
need to make sure it really works.

2. new xslt in xslt project,
at least in pseudo localized locale,
and based on wsdl created in that project,
shows in design area
Unable to show mapper: 
Cannot resolve input type for transformation (newXSLFile2.xsl) 
even in en locale -
i created the xslt svc using a wsdl file created in the same proejct
as the web svc needed for the xslt svc -- is this known issue or pilot error ?

ken.frank@sun.com
Comment 32 kaa 2007-11-08 18:49:47 UTC
answer about square boxes:

Square boxes are representing the name of wsdl_from_db document. I specified it using wizard.
I checked on XP usng SQL Module, build 1106, ja locale, UTF-8 project encoding
Comment 33 kaa 2007-11-08 18:50:34 UTC
Created attachment 52754 [details]
square boxes
Comment 34 kaa 2007-11-08 18:52:03 UTC
Created attachment 52755 [details]
square boxes (correct MIME type)
Comment 35 kaa 2007-11-09 20:08:00 UTC
I've filed separate issue 121622 on square boxes in wsdl_from_db doc
Comment 36 kaa 2007-11-29 16:10:24 UTC
Case 2 about Xslt service is reproducible with 1123 build, XP. ja_JP
Comment 37 Vitaly Bychkov 2007-11-30 10:35:28 UTC
The problem with case 2 is not encoding problem. It's known issue - 96237.
Comment 38 kaa 2007-11-30 13:08:21 UTC
checked the following files (build 1123, XP, ja_JP/win-31j):
xsl, xml, xsd, dtd, wsdl, bpel, wsdl_from_db