Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ajit - 20 Jul 2005 11:38 GMT
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?

Signature

Regards
-Ajit

François Lemaire - 22 Jul 2005 10:40 GMT
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

> 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?
[quoted text clipped - 61 lines]
> Pl. let me know if it is possible. and if yes, how can I dploy such a web
> service?
Ajit - 29 Jul 2005 06:33 GMT
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?
Signature

Regards
-Ajit

> 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
[quoted text clipped - 71 lines]
> > Pl. let me know if it is possible. and if yes, how can I dploy such a web
> > service?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.