webservice - companyname with special characters

dr
Member Posts: 11
the documentation says for a page-webservice that the url is [url=http://]http://[/url]<Server>:<WebServicePort>/<ServerInstance>/WS/<CompanyName>/Page/<ServiceName>
an example with cronus shows me something like http://localhost:7047/DynamicsNAV/WS/CR ... e/Customer
but i have a company with some special characters (like: Xyz GmbH & Co. KG) and i can't reach the webservice. where is the documentation for proper encoding? its not "normal" url encoding, because whitespaces become underscores and not "%20". what to do with the "&" and maybe the "."??
hope for some help,
daniel
an example with cronus shows me something like http://localhost:7047/DynamicsNAV/WS/CR ... e/Customer
but i have a company with some special characters (like: Xyz GmbH & Co. KG) and i can't reach the webservice. where is the documentation for proper encoding? its not "normal" url encoding, because whitespaces become underscores and not "%20". what to do with the "&" and maybe the "."??
hope for some help,
daniel
0
Answers
-
-
sure. i used the underscores for whitespaces like "Xyz_GmbH_&_Co._KG" but it did not work and i used underscores for the other special characters but it did not work and tried some other things that did not work...0
-
the dots are replaced by underscores too, AND if there are two underscores, they are replaced by only one in the result. But To be sure which companies you can call, you can use the system webservice to read the list of available companies and there you have exact values for calling the WS. 8)0
-
You might be able to find some help in the last couple of posts in this thread:
http://www.mibuso.com/forum/viewtopic.php?f=32&t=29665&hilit=companies&start=15
A couple of rules
period and spaces are replaced with underscore
trailing underscores are removed
other special characters become _x<4 digit hex value>_
So
CRONUS USA, Inc
becomes
CROUNS_USA_x002C__Inc
(note two underscores before Inc)
You can always create a small app and request the company names from SystemService - rossb wrote the following code in the other thread:
// Create instance of service and setting credentials
SystemService.SystemService service = new SystemService.SystemService();
service.UseDefaultCredentials = true;
// Set the service URL
service.Url = "http://tucvm07:7047/DynamicsNAV/WS/SystemService";
// Load all companies into an array
string[] strarray = service.Companies();
// Run through and print all companies
foreach (string str in strarray)
{
MessageBox.Show(str);
}
And to complete this post - we are not really proud of this company name encoding and we are might change this to a standard URL encoding algorithm in the future. SystemService.companies will then of course return the name that works.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
0
-
thx for your help. solved!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions