Visual C# Professional 2012 and NAV Web Service

SDI
Member Posts: 5
Well, C# 2012 is now available and I'm probably the pioneer here, but so far I can find the same buttons / menu as is described in walk through directions for 2010, yet I'm getting an error.
I have NAV running and the web service started and the customer list being published by NAV as a code page. When I paste the URL into IE, I get an XML reply, which I believe is correct.
http://localhost:7047/DynamicsNAV/WS/CR ... ./services
XML reply:
<?xml version="1.0"?>
-<discovery xmlns="http://schemas.xmlsoap.org/disco/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contractRef xmlns="http://schemas.xmlsoap.org/disco/scl/"
ref="http://localhost:7047/DynamicsNAV/WS/CRONUS EXT USA, Inc/SystemService"/>
<contractRef xmlns="http://schemas.xmlsoap.org/disco/scl/"
ref="http://localhost:7047/DynamicsNAV/WS/CRONUS EXT USA, Inc/Page/Customer"/>
</discovery>
As far as I know, VS C# will connect to this same web service and I followed the same instructions as VS 2010:
I opened it as a new project ; WindowsFormApplication, right clicked References, Service Reference Settings; (at bottom) Add Web Reference
In the Add Web Reference window it asks for the URL, so I paste the same URL and click Web Services on local machine:
http://localhost:7047/DynamicsNAV/WS/CR ... ./services
and I get this error:
There was an error while enumerating services on local machine:
Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. Another possible cause is that IIS is not installed on the local machine, or the user identity under which you are running may not have permissions to view websites on this machine. To view websites on this machine, make sure that you run Visual Studio as administrator. On Windows Vista computers with IIS installed, make sure that IIS Metabase and IIS 6 configuration compatibility feature is enabled.
Am I actually running IIS ? I guess so.
Help is appreciated..
I have NAV running and the web service started and the customer list being published by NAV as a code page. When I paste the URL into IE, I get an XML reply, which I believe is correct.
http://localhost:7047/DynamicsNAV/WS/CR ... ./services
XML reply:
<?xml version="1.0"?>
-<discovery xmlns="http://schemas.xmlsoap.org/disco/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contractRef xmlns="http://schemas.xmlsoap.org/disco/scl/"
ref="http://localhost:7047/DynamicsNAV/WS/CRONUS EXT USA, Inc/SystemService"/>
<contractRef xmlns="http://schemas.xmlsoap.org/disco/scl/"
ref="http://localhost:7047/DynamicsNAV/WS/CRONUS EXT USA, Inc/Page/Customer"/>
</discovery>
As far as I know, VS C# will connect to this same web service and I followed the same instructions as VS 2010:
I opened it as a new project ; WindowsFormApplication, right clicked References, Service Reference Settings; (at bottom) Add Web Reference
In the Add Web Reference window it asks for the URL, so I paste the same URL and click Web Services on local machine:
http://localhost:7047/DynamicsNAV/WS/CR ... ./services
and I get this error:
There was an error while enumerating services on local machine:
Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. Another possible cause is that IIS is not installed on the local machine, or the user identity under which you are running may not have permissions to view websites on this machine. To view websites on this machine, make sure that you run Visual Studio as administrator. On Windows Vista computers with IIS installed, make sure that IIS Metabase and IIS 6 configuration compatibility feature is enabled.
Am I actually running IIS ? I guess so.
Help is appreciated..
0
Comments
-
Hi,
I tried it with the OData Service (Port 7048) and VS20212 RC.
No connection problems.
// Edit:
I just added a Service Reference to "http://localhost:7048/DynamicsNAV70/OData/"
Used the NAV Help to build the demo.
Check Walktrough from Help for SOAP:
When do you get the error? By adding the web reference or by running the code?
Regards,
Egnaz0 -
Instead of clicking on Web service for local machine. I just put in the URL and hit --> (go) and then it worked.
So that brings me to the Program.cs and the sample being used is Letters service, if you look at consuming a web page:
http://msdn.microsoft.com/en-us/library/dd339004
So I replace the code in the window with the code on the msdn site and I get an error:
"The type or namespace name 'WebService' could not be found."
.. Any ideas ?0 -
When I added the WebService, it added it as localhost, I changed the name to WebService and hit F5 and I got a SOAP exception unhandled on the line that calls NAV.
// Call the Microsoft Dynamics NAV codeunit Web service.
outputstring = ws.Capitalize(inputstring);
Soap exception unhandled
Service "services" was not found!
??0 -
ok... nm.. I closed the debugger and opened the Solutions Explorer, mainly because I didnt know how to exit the debug mode. So then I hit F5 once more and it worked fine. So at least I get the desired results, sort of..
Now I have to connect to ConnectWise. Oh.. This should be fun. *sarcasm*0 -
I am working on an integration to ConnectWise for our organization. You mentioned you were working on connecting also. Did you ever get a connection going? We are planning on using ConnectWise to support our Dynamics NAV and network services call management needs and want to get invoicing data out of ConnectWise. Any insights you have would be appreciated.Ron Taylor
ICS Support, Inc.
8541 154th Ave. NE
Redmond, WA. 980520
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