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 70966 - I18N - web service with mbtyte project name (dir name) won't build
Summary: I18N - web service with mbtyte project name (dir name) won't build
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2006-01-04 01:47 UTC by Ken Frank
Modified: 2006-01-26 10:50 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Output window (4.75 KB, text/plain)
2006-01-05 09:42 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2006-01-04 01:47:55 UTC
in 70764, on this same topic for blueprint samples with web service with mybte
project or dir name as part of path of project location, Yuta noticed also
problem with non sample web service - so this is separate issue on it -
here are his comments:


I tested several things and found out:-

o endpoint
  There's a bug in bpcatalog(java.net) which is not handling
  this case. This is easy to fix by just adding encoding="utf-8"
  when copying the wscompile config file.

o client
  We also have the same problem in the client side. It's not
  blueprints specific. To reproduce, do:-

  1. Projectize StringWebService from BluePrints solutions catalog
     and "Run" it.
  2. Create new project (web app) under the project location contains
     multi byte characters
  3. Do "New->Web Service Client"
  4. Set "http://localhost:8080/webservice/StringPurchaseOrderService?WSDL"
     in "WSDL URL", "Retrive WSDL"
  5. Enter a package name and hit "finish"

Then, you'll see the same error.
The problem is, generated nbproject/build-impl.xml has the code something like:-
====
<copy filtering="on"
tofile="${build.generated.dir}/wsclient/wsdl/StringPurchaseOrderService-config.xml" 
file="${web.docbase.dir}/WEB-INF/wsdl/StringPurchaseOrderService-config.xml">
    <filterset>
       <filter value="${config_target}" token="CONFIG_ABSOLUTE_PATH"/>
    </filterset>
</copy>
====
The <copy> task must have encoding="UTF-8" as well.

===> so this issue is about the client side situation mentioned above.
Comment 1 Milan Kuchtiak 2006-01-04 15:00:50 UTC
Ken, who is able to implement the fix for the first part ?

I fixed the second part:
http://web.netbeans.org/source/browse/web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl?r1=1.111&r2=1.112
http://java.netbeans.org/source/browse/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl?r1=1.69&r2=1.70

Is the bug critical for release50 ?

Ken, can you also verify the fix ?
Comment 2 Milan Kuchtiak 2006-01-04 15:16:13 UTC
Now I noticed that the first problem was fixed already.
Comment 3 Ken Frank 2006-01-04 17:47:37 UTC
The fix for the first part should be as part of 70764. Yuta, can you
discuss with Milan, developer on this issue, about the whole situation ?
I'll send you both some separate mail also since want to understand
scenarios so that verification can be done.

Milan, can this part you fixed be verified separate from the bp samples issue
of 70764 ?
Is there a scenario ?

ken.frank@sun.com
Comment 4 Milan Kuchtiak 2006-01-05 08:17:56 UTC
The scenario is simple.
Just create a WS Client in a web project or j2se project located in directory
which path contains multibyte characters.
Then try to build the project.

Sample URL for WS Client :
http://www.progem.bg/BGTrans/services.wsdl

Marek, can you verify the fix.
Radko, can you look at the fix to web/project and java/j2seproject.
Comment 5 Radko Najman 2006-01-05 08:33:19 UTC
It seems OK to me.
Comment 6 Marek Grummich 2006-01-05 09:42:07 UTC
Created attachment 28194 [details]
Output window
Comment 7 Marek Grummich 2006-01-05 09:44:44 UTC
Sorry, I have to reopen this issue, because when I try the described scenario, I
get an attached output - BUILD FAILED.
Build 200601041900 (trunk) 
Comment 8 Milan Kuchtiak 2006-01-05 14:55:19 UTC
The location attribute in config.xml requires proper URL :
It is required especially when multibyte characters occur in url path :
As the wsdl file is always local in project - I've added the "file://" prefix to
wsdl location URL.

Diff:
http://websvc.netbeans.org/source/browse/websvc/core/src/org/netbeans/modules/websvc/core/client/wizard/ClientBuilder.java?r1=1.39&r2=1.40

Marek, please verify the fix again.
Jarda, can you test the fix ?

Comment 9 Milan Kuchtiak 2006-01-05 15:59:58 UTC
The proper URL prefix for local files for both Windows and Unix is "file:".

Moreover, the solution now is the same as for Web Service generation.
(The location value in config file starts also with "file:" prefix)  

Final diff:
http://websvc.netbeans.org/source/browse/websvc/core/src/org/netbeans/modules/websvc/core/client/wizard/ClientBuilder.java?r1=1.40&r2=1.41

I forgot to mention that the fix consists of 2 steps :

The first step (suggested by Yuta Yoshida).
- add encoding="UTF-8" attribute to copy task in build script

The second step :
- fix the improper URL in config file (location attribute) by adding "file:"
prefix for local wsdl files.

Comment 10 Marek Grummich 2006-01-06 08:46:05 UTC
I tried to create a new Web Service Client for both Java and Web Application in
the build 20060101900 (trunk) and everything went ok. Milan, you can integrate
fix into 5.0 branch. Thanks!
Comment 12 Marek Grummich 2006-01-26 10:50:07 UTC
verified