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..
Comments
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,
Egnaz
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 ?
// Call the Microsoft Dynamics NAV codeunit Web service.
outputstring = ws.Capitalize(inputstring);
Soap exception unhandled
Service "services" was not found!
??
Now I have to connect to ConnectWise. Oh.. This should be fun. *sarcasm*
ICS Support, Inc.
8541 154th Ave. NE
Redmond, WA. 98052