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 147289

Summary: I18N - Web service client name shows multibyte chars by their codes
Product: webservices Reporter: kaa <kaa>
Component: ClientAssignee: Milan Kuchtiak <mkuchtiak>
Status: RESOLVED FIXED    
Severity: blocker CC: kfrank, pjiricka
Priority: P2 Keywords: I18N
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 149745    
Bug Blocks:    
Attachments: image: MacOS
image: WinXP
err message for ws client (ws has mbyte chars)
ws reference was created in case of Latin chars only (circled in blue)
the app was deployed
Web service has mbyte chars in its name
NPE
run-deploy output
GFv2 log file
wsdl url results
schema url results
WS created in Japanese locale

Description kaa 2008-09-15 16:56:49 UTC
Product Version: NetBeans IDE Dev (Build 200809101401)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb), UTF-8 project encoding
The same on MacOS X, Ja locale, UTF-8

1. Create Web App
2. Create Web Service using mbyte chars in its name
3. Add an operation to the Web Service
4. Deploy the app (I used GFv2)
5. Create a Web Service client using created Web Service (specify the project)
6. Expand Web Service References (Projects tab)

There is a client name with codes instead of multibyte chars.
See image.
Comment 1 kaa 2008-09-15 16:57:31 UTC
Created attachment 69887 [details]
image: MacOS
Comment 2 kaa 2008-09-15 16:59:31 UTC
Created attachment 69888 [details]
image: WinXP
Comment 3 kaa 2008-09-15 17:00:37 UTC
I'm running in Japanese locale, using a pseudo localized Netbeans with font size 16 option.
Comment 4 Milan Kuchtiak 2008-09-16 09:45:27 UTC
Should be fixed for 6.5. Client node display names should accept multibyte chars correctly.
Comment 5 Milan Kuchtiak 2008-09-16 16:34:55 UTC
Fixed:
http://hg.netbeans.org/main?cmd=changeset;node=942157c98c8f
Comment 6 Quality Engineering 2008-09-17 06:00:37 UTC
Integrated into 'main-golden', will be available in build *200809170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/942157c98c8f
User: mkuchtiak@netbeans.org
Log: #147289: Decode URL string back for WS Client
Comment 7 kaa 2008-10-09 18:11:34 UTC
Product Version: NetBeans IDE Dev (Build 200810051401)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP
I'm running in Japanese locale, using a pseudo localized Netbeans with font size 16 option.

I tried to create the client from a web service with multibyte chars in name only. After the step 6 from above I can't
see the client under Web Service References. When did the same with Latin chars, the reference was created properly.

Comment 8 kaa 2008-10-09 18:21:13 UTC
Created attachment 71491 [details]
err message for ws client (ws has mbyte chars)
Comment 9 kaa 2008-10-09 18:21:52 UTC
Created attachment 71492 [details]
ws reference was created in case of Latin chars only (circled in blue)
Comment 10 Milan Kuchtiak 2008-10-10 13:19:57 UTC
The error message is the same as if WS were not deployed yet.
I expect, the service was deployed before client creation, right ?
Please confirm.

We have an issue related to this : issue 105294.

You also uses a non standard approach where WS Client is in the same project as Web service (this is not much real use
case).
Nevertheless, Netbeans should support this.

I need additional info.
Please, create another project and create WS client in that project.
Tell us, please, whether WS client works or not.

BTW. there is some "unexpected improvement" implemented in 6.5 : When project is cleaned it's also undeployed !!!

Note: I found one problem related to Multibyte characters - specifically problem with XML Catalog: issue 149745.
Comment 11 kaa 2008-10-10 13:55:15 UTC
The application with the service was deployed using GFv2 (see images below). I created another web application and tried
to use the deployed one to create WS Client. As a result a got the same message. Also I noticed that with Latin chars in
WS name, the reference was created properly.
Comment 12 kaa 2008-10-10 13:56:09 UTC
Created attachment 71549 [details]
the app was deployed
Comment 13 kaa 2008-10-10 13:56:44 UTC
Created attachment 71550 [details]
Web service has mbyte chars in its name
Comment 14 Milan Kuchtiak 2008-10-10 15:17:47 UTC
I have difficulties to reproduce.
Any other information would help:

- output window messages
- pleaae, test if Web Service WSDL is available in browser - before WS Client creation
  (invoke Test Web Service action on WEB Services | Web Service node and , if page is open, click WSDL file)
Comment 15 kaa 2008-10-10 15:37:57 UTC
Note that I am in Japanese locale.
Results of the experiment:

Product Version: NetBeans IDE Dev (Build 200810051401)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP
I'm running in Japanese locale, using a pseudo localized Netbeans with font size 16 option.

1. Create Web App
2. Create Web Service using mbyte chars in its name
3. Add an operation to the Web Service
4. Deploy the app (I used GFv2)
5. Choose Test WS from the pop-up menu

The browser was opened with NPE (attached).
In case of Latin chars the test page was opened properly.
Comment 16 kaa 2008-10-10 15:38:43 UTC
Created attachment 71560 [details]
NPE
Comment 17 kaa 2008-10-10 15:41:32 UTC
Created attachment 71561 [details]
run-deploy output
Comment 18 kaa 2008-10-10 15:43:38 UTC
Created attachment 71563 [details]
GFv2 log file
Comment 19 Milan Kuchtiak 2008-10-10 16:19:18 UTC
It's evident the service was not deployed correctly (the Tester action doesn't work).

Please, can you provide 2 another checks :

- look at the WSDL URL - if it is available
the same URL as Tester page, but instead of "http://localhost...?Tester" it is "http://localhost...?WSDL"

- then, please, check if schema URL is available :
  there is a <xsd: import generated in wsdl, e.g.:
<xsd:import namespace="http://a/" schemaLocation="http://localhost:8080/WebApplicationT/ææêÆèÊËÉÇÃÆÒÄÅØÄÓService?xsd=1"/>
  (just copy the text from schemaLocation attribute to browser)

I guess, though the wsdl is available, the imported schema isn't.
This looks like a JAX-WS bug.
Comment 20 Milan Kuchtiak 2008-10-10 16:25:26 UTC
The similar issue was reported to JAX-WS:
https://jax-ws.dev.java.net/issues/show_bug.cgi?id=543

The conclusion there is:
> ... 
> This might happen if your environment is not set correctly, and Java uses a
> different encoding than your system encoding.
> Java uses env variable LC_ALL, LC_CTYPE, LANG in that order to find out the
> locale to use for encoding. Check if this variable is set correctly.
Comment 21 kaa 2008-10-10 16:47:56 UTC
Attaching 2 files:

1. Results for opening WSDL URL in browser
2. Results for opening schema URL in browser

Both files were opened without problems.
I'm running in Japanese locale, using a pseudo localized Netbeans with font size 16 option. 
Project encoding is UTF-8.
Comment 22 kaa 2008-10-10 16:49:15 UTC
Created attachment 71567 [details]
wsdl url results
Comment 23 kaa 2008-10-10 16:49:54 UTC
Created attachment 71568 [details]
schema url results
Comment 24 Milan Kuchtiak 2008-10-10 16:55:47 UTC
That means, the problem is on Netbeans site. Thank You very much.
Comment 25 Milan Kuchtiak 2008-10-13 12:22:11 UTC
I installed the Japanese environment, created a web service with Japanese name, web project with Japanese name.
Everything works perfectly. (Service creation, Test WS action, Client creation, Drag & Drop WS Operation into client code).
It should be something strange with a web service deployed on GlassFish in reporter environment. See that WS Tester
failed there.
I'll ask QE engineer to reproduce the issue in Windows Environment.

Note: I even tried to create project in space_in_path folder. 
Comment 26 Milan Kuchtiak 2008-10-13 12:23:57 UTC
Created attachment 71657 [details]
WS created in Japanese locale
Comment 27 Jaroslav Pospisil 2008-10-13 16:17:50 UTC
This seems to be platform specific issue. I'm able to reproduce issue successfully on my Windows Vista.When I create Web
Service with multibyte characters in name, when I click on Properties,I got this for wsdl address of the service:
http://localhost:8080/WebApplication9/%E5%95%86%E6%B3%95%E8%AC%9B%E7%BF%92Service?wsdl
Comment 28 Ken Frank 2008-10-13 16:26:46 UTC
Jarek, thanks for looking at this.

Milan, since filer kaa is on vacation for 2 weeks, and he would need to do more followup on additional fixes, but since
we are now at code freeze,  can we waive this issue now
and return to this for next release or first patch ? 

ken.frank@sun.com
Comment 29 Milan Kuchtiak 2008-10-13 16:28:28 UTC
Right, of course.
Comment 30 Milan Kuchtiak 2009-04-06 16:36:38 UTC
After a careful investigation I came into conclusion that everything (except of one case) works perfectly :

1. The WS Client Node name is derived from WSDL file wsdl:service->name attribute.

2. The WSDL url in service properties dialog:
http://localhost:8080/WebApplication9/%E5%95%86%E6%B3%95%E8%AC%9B%E7%BF%92Service?wsdl
is absolutely fine, since this is a URL Encoded string containing MB characters. If you copy this string to a web
browser, the wsdl file is shown, and URL in web browser is changed to specific(e.g. Japanese) characters.

3. Now, when the client is created using the project option. the client artifacts are generated correctly.

And this is the last fix for WS Client -> WSDL URL option:
http://hg.netbeans.org/main?cmd=changeset;node=a1bab2ff4879
Comment 31 Quality Engineering 2009-04-09 19:27:25 UTC
Integrated into 'main-golden', will be available in build *200904091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a1bab2ff4879
User: mkuchtiak@netbeans.org
Log: #147289: decode URL String prior to processing
Comment 32 Nikita Krjukov 2009-04-13 14:46:51 UTC
Could somebody check if the related issue #149745 has still actual?