472,973 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

Is it possible to have a web service name in localized string?

Is it possible to have a web service name in localized string. Let's say, can
I have a web service developed in C# having class name in Japanese?
I am trying to build a web service as follows

namespace Test2
{
/// <summary>
/// Summary description for Service1.
/// </summary>
public class セ : System.Web.Services.WebService
{
public セ()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}

#region Component Designer generated code

//Required by the Web Services Designer
private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

#endregion

// WEB SERVICE EXAMPLE
// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build the project
// To test this web service, press F5

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
So, if you notice, I have a class name as "セ" which is some japanese
character.
When I try to run this application, I get the parsing error in my .asmx file
for classname in webservice directive.

Pl. let me know if it is possible. and if yes, how can I dploy such a web
service?

--
Regards
-Ajit
Nov 23 '05 #1
2 1673
I don't think it is possible, nor would it be a good thing. The name of your
class will be used for the URL of your service, and URL don't like localized
characters (they are changed into %XX escaped sequences, where XX is in
hexa). I guess you will have to name your service "se" (your character is a
"se" in katakana, right ?)

Regards

François

"Ajit" wrote:
Is it possible to have a web service name in localized string. Let's say, can
I have a web service developed in C# having class name in Japanese?
I am trying to build a web service as follows

namespace Test2
{
/// <summary>
/// Summary description for Service1.
/// </summary>
public class セ : System.Web.Services.WebService
{
public セ()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}

#region Component Designer generated code

//Required by the Web Services Designer
private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

#endregion

// WEB SERVICE EXAMPLE
// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build the project
// To test this web service, press F5

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
So, if you notice, I have a class name as "セ" which is some japanese
character.
When I try to run this application, I get the parsing error in my .asmx file
for classname in webservice directive.

Pl. let me know if it is possible. and if yes, how can I dploy such a web
service?

--
Regards
-Ajit

Nov 23 '05 #2
Thanks for the response and sorry for the late reply.:)
I am not sure about the character which I used, whether it is in katakana or
in something else, as I don't understand japanese. I just copied it from one
of the japanese web site and put it in my program to do certain testing.

Probably you are right as non-ascii characters get replaced by %XX escaped
sequences.

But when I developed a web service with web service name in japanese it
works fine.

I have another issue to resolve though. I have a web service with one of the
method's name is in Japanese.
Let's say "HelloWorldプ "

when I use IE directly to send the message to this web service, it shows to
me that it's SOAPAction is
SOAPAction: "http://tempuri.org/HelloWorld%E3%83%97"

but when I open the WSDL file for the same, I am getting SOAPAction for this
operation as "http://tempuri.org/HelloWorldプ"
So why does IE shows me SOAPAction in escaped sequence while WSDL file shows
me the japanese characters directly in SOAPAction?
--
Regards
-Ajit
"François Lemaire" wrote:
I don't think it is possible, nor would it be a good thing. The name of your
class will be used for the URL of your service, and URL don't like localized
characters (they are changed into %XX escaped sequences, where XX is in
hexa). I guess you will have to name your service "se" (your character is a
"se" in katakana, right ?)

Regards

François

"Ajit" wrote:
Is it possible to have a web service name in localized string. Let's say, can
I have a web service developed in C# having class name in Japanese?
I am trying to build a web service as follows

namespace Test2
{
/// <summary>
/// Summary description for Service1.
/// </summary>
public class セ : System.Web.Services.WebService
{
public セ()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}

#region Component Designer generated code

//Required by the Web Services Designer
private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}

#endregion

// WEB SERVICE EXAMPLE
// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build the project
// To test this web service, press F5

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
So, if you notice, I have a class name as "セ" which is some japanese
character.
When I try to run this application, I get the parsing error in my .asmx file
for classname in webservice directive.

Pl. let me know if it is possible. and if yes, how can I dploy such a web
service?

--
Regards
-Ajit

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: burdeen | last post by:
I've been trying to return an array with PHP5 soap. Is this not supported? or am i doing it wrong? Seems to return on the last element in the array. In my WSDL i've defined my return type as a...
15
by: Viviana Vc | last post by:
How can I programatically do the equivalent of the following: cacls "C:\Program Files\test" /T /G Everyone:f ? Thanks, Viv
9
by: Hardy Wang | last post by:
Hi all: I read an article from http://www.c-sharpcorner.com/Code/2003/Sept/InstallingWinServiceProgrammatically.asp about how to install a windows service programmatically. Based ont the code...
0
by: umhlali | last post by:
I get the following exception when my VB.NET app calls a Java web service that returns an array of objects. The same call works for a single object though. So looks like there is no problem...
1
by: GeorgeB | last post by:
I use HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;322090> to send text to a dotmatrix printer. I cannot print localized text...
1
by: Chukkalove | last post by:
I originally created several "copy" resource reader classes which worked great individually, but after I converted them into an parent class with children they no longer find the resources. Each...
2
by: Chicken15 | last post by:
Hi Group. First of all I'm sorry for asking (maybe) such easy questions. But I'm quite stuck now and couldn't come up with a solution by using my C# book or googling. So it would be nice if...
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
6
by: =?Utf-8?B?THVib21pcg==?= | last post by:
Hi, I would like to ask how can I with C# find out the service name on non-English Windows OS. Thanks, Lubomir
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.