Web services in nav R2
rhardoyal
Member Posts: 78
Hi,
Any one has any example of how to use web services in navision R2. Please help on this.
Thanks
Rizwana
Any one has any example of how to use web services in navision R2. Please help on this.
Thanks
Rizwana
0
Answers
-
:-k
I clicked the URL .. and I do think there are much better examples .. not to say that the URL above isn't a NAV 2009 example (2009 isn't even mentioned in the article). Or am I dreaming? :-)
Here are some of mine:
- http://dynamicsuser.net/blogs/waldo/arc ... rvice.aspx
- http://dynamicsuser.net/blogs/waldo/arc ... rvice.aspx
There are lots of examples on Freddy's blog. here is one:
- http://blogs.msdn.com/b/freddyk/archive ... again.aspx0 -
Waldo wrote::-k
I clicked the URL .. and I do think there are much better examples .. not to say that the URL above isn't a NAV 2009 example (2009 isn't even mentioned in the article). Or am I dreaming? :-)
Here are some of mine:
- http://dynamicsuser.net/blogs/waldo/arc ... rvice.aspx
- http://dynamicsuser.net/blogs/waldo/arc ... rvice.aspx
There are lots of examples on Freddy's blog. here is one:
- http://blogs.msdn.com/b/freddyk/archive ... again.aspx
Hi Waldo
when I try to use
http://localhost:7047/DynamicsNAV/WS/Services
I'm getting error,
Internet Explorer can not display the webpage ](*,)
what am I doing wrong here ?
Thanks in advance
ChowdaryPleasure in the job puts perfection in the work0 -
Waldo wrote:Are your web services running ("business webservices" in your services window..)?
If you restart, you can find a url in the event viewer where you can find the web services. Does it deviate of the url you're trying to use?
Oops !!
you are right, web services stopped.
Thanks waldo. It's okay now
ChowdaryPleasure in the job puts perfection in the work0 -
Hi Waldo
I can not see Visual C# on my Visual Studio window.( that you show on your blog)
Do I have to install other s/w ?
Thanks in advance
ChowdaryPleasure in the job puts perfection in the work0 -
does anyone know or have the sample which we can send parameter as to open company name?
because i have case, i'm using 1 database with several companies....
each txt file for each company.... so i must import the txt file or different company0 -
Waldo wrote:Chowdary wrote:Hi Waldo
I can not see Visual C# on my Visual Studio window.( that you show on your blog)
Do I have to install other s/w ?
Thanks in advance
Chowdary
Did you install it while installing Visual Studio?
what is it. I mean, what software ?
BTW, I have installed Microsoft visual c# 2008 express edition yesterday with no luck to see Visual C# node.
Plz help me out ](*,)
Thanks
ChowdaryPleasure in the job puts perfection in the work0 -
julkifli33 wrote:does anyone know or have the sample which we can send parameter as to open company name?
because i have case, i'm using 1 database with several companies....
each txt file for each company.... so i must import the txt file or different company
The company that you open is the one that you use in the URL of the web-service for example:
http://localhost:7047/DynamicsNAV/WS/Re ... on_Service
See it says "ReplaceWithAPercentEncodedCompanyName".0 -
Chowdary wrote:Waldo wrote:Chowdary wrote:Hi Waldo
I can not see Visual C# on my Visual Studio window.( that you show on your blog)
Do I have to install other s/w ?
Thanks in advance
Chowdary
Did you install it while installing Visual Studio?
what is it. I mean, what software ?
BTW, I have installed Microsoft visual c# 2008 express edition yesterday with no luck to see Visual C# node.
Plz help me out ](*,)
Thanks
Chowdary
=D>
I managed to see Visual C# node, after installing Visual Studio 2010.Pleasure in the job puts perfection in the work0 -
One more issue came up :x
when I browse service using
http://localhost:7047/DynamicsNAV/WS/Services
I saw xml code.
but when I'm trying with company name
http://localhost:7047/DynamicsNAV/WS/CR ... d/Services
am getting http 500 internal error.
Even log showing:
Service "CRONUS International Ltd/Services/_vti_bin/ListData.svc/$metadata" was not found!
any idea :-k
Thanks
ChowdaryPleasure in the job puts perfection in the work0 -
Since this is an url you ened to encode it. The Company name has white spaces in it's name so you need to replace them with %20, or simply call the method
System.Web.HttpUtility.UrlPathEncode() (http://msdn.microsoft.com/en-us/library/4fkewx0t.aspx)0 -
deV.ch wrote:Since this is an url you ened to encode it. The Company name has white spaces in it's name so you need to replace them with %20, or simply call the method
System.Web.HttpUtility.UrlPathEncode() (http://msdn.microsoft.com/en-us/library/4fkewx0t.aspx)
deV thanks for the response
Actually I'm using %20, if not me IE assigning space with %20.
So, that's not a problem.
Today, my web server is not responding. I mean if I run with http://localhost am getting error.
I have installed visual Studio 2010 today, is that causing problem?An error has occurred.
Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.
am searching forums to find out why http://localhost is not running, but cannot find my answer.
any ideas would be greatly appreciated.
Thanks
ChowdaryPleasure in the job puts perfection in the work0 -
Duikmeester wrote:julkifli33 wrote:does anyone know or have the sample which we can send parameter as to open company name?
because i have case, i'm using 1 database with several companies....
each txt file for each company.... so i must import the txt file or different company
The company that you open is the one that you use in the URL of the web-service for example:
http://localhost:7047/DynamicsNAV/WS/Re ... on_Service
See it says "ReplaceWithAPercentEncodedCompanyName".deV.ch wrote:Since this is an url you ened to encode it. The Company name has white spaces in it's name so you need to replace them with %20, or simply call the method
System.Web.HttpUtility.UrlPathEncode() (http://msdn.microsoft.com/en-us/library/4fkewx0t.aspx)
so can i create 1 C# form.... to execute all these companies???
or should I create as many as companies?
lets say now i have 5 companies, but how if there are 2 more companies in the future?
should i create another c# web services?
thanks0 -
Nope the service doesn't change if you add a company. It just responds on the new URL. It's pritty simple you just need to replace the hardcoded URL with a dynamic like:
string EncodedCompanyName = System.Web.HttpUtility.UrlPathEncode(CompanyName); string WSUrl = string.Format("http://localhost:7047/DynamicsNAV/WS/{0}/Codeunit/Integration_Service",EncodedComapanyName);
On your C# Form you add a dropdown list, that shows all companys (If you not already know, there is a system service that returns you a list of all companies).0 -
If http://localhost is not working, this is not the right forum.0
-
deV.ch wrote:Nope the service doesn't change if you add a company. It just responds on the new URL. It's pritty simple you just need to replace the hardcoded URL with a dynamic like:
string EncodedCompanyName = System.Web.HttpUtility.UrlPathEncode(CompanyName); string WSUrl = string.Format("http://localhost:7047/DynamicsNAV/WS/{0}/Codeunit/Integration_Service",EncodedComapanyName);
On your C# Form you add a dropdown list, that shows all companys (If you not already know, there is a system service that returns you a list of all companies).
does anyone know how to drop down company?0 -
if i created import data using report
can we automate it using web service (windows scheduler) ?
thanks0 -
Hi julkifli33,julkifli33 wrote:if i created import data using report
can we automate it using web service (windows scheduler) ?
thanks
My understanding you want to call your program from Window Schedule? Am i right?
For my view is "Yes".
1. Write Simple prorgam (c#)
2. Window Schedule Call to ur prog.
3. Public CU (in NAV)
4. CU call to your import rpt. (in NAV).
I hope someone can give to you best ans. That is from my point
Regards,
YukonMake Simple & Easy0 -
yukon wrote:Hi julkifli33,julkifli33 wrote:if i created import data using report
can we automate it using web service (windows scheduler) ?
thanks
My understanding you want to call your program from Window Schedule? Am i right?
For my view is "Yes".
1. Write Simple prorgam (c#)
2. Window Schedule Call to ur prog.
3. Public CU (in NAV)
4. CU call to your import rpt. (in NAV).
I hope someone can give to you best ans. That is from my point
Regards,
Yukon
ok then... now i get it...
but i just dont know how to code open the company0 -
do any of you have simple code
how web service execute codeunit?
for example i have code in my code unit like this :OnRun() MESSAGE('Hello World');
is it can be showed in webservices?
or we should create function?0 -
<?xml version="1.0"?>
-<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">-<s:Body>-<s:Fault>
<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Service.WebServices.ServiceBrokerException</faultcode>
<faultstring xml:lang="en-US">Service "Company name/Services/Codeunit/TWC_Import" was not found!</faultstring>-
<detail><string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Service "Company Name/Services/Codeunit/TWC_Import" was not found!</string></detail></s:Fault></s:Body></s:Envelope>
why my services not found?
i already published the codeunit
and i already start the service for webservice
what did i miss?0 -
hi ...
i want to know
i have created new codeunit --> 50001
from this codeunit i trigger codeunit 80 (which is sales post)
in order to use this in webservice, do i need to publish this codeunit 80 as well ?
or just codeunit 50001?
thanks0 -
You only need to publish C50001. You do not need to public C80 as long as you only call C80 though C50001.
Regards0 -
Hi all,
I created C# app which has two textboxes which i use as a parametars in function from Codeunit, but i dont have return parametars, my function only modify one fields in NAV.
This is C# app:
This is NAV:
This is error in Event Viewer:
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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


