Call .NET DLL in NAV to consume external web service

aniruddha_majumdar
Member Posts: 57
Dear All,
We have a scenario where we need to consume an external webservice(SOAP based) exposed by a JAVA application. The web service is pretty simple wherein we have to pass very basic details of Vendor/Employee whenever the same is created NAV 2013. The JAVA application will create an entry based on that.
Our Solution Approach:
We tried both with C# console Application as well as windows application but could NOT end up in utilising the dll in NAV 2013.
Please let me know the right approach to achieve this. If there is any we can use the functionality .NET framework interoperability to consume the external Webservice.
Thanks,
Aniruddha
We have a scenario where we need to consume an external webservice(SOAP based) exposed by a JAVA application. The web service is pretty simple wherein we have to pass very basic details of Vendor/Employee whenever the same is created NAV 2013. The JAVA application will create an entry based on that.
Our Solution Approach:
We tried both with C# console Application as well as windows application but could NOT end up in utilising the dll in NAV 2013.
Please let me know the right approach to achieve this. If there is any we can use the functionality .NET framework interoperability to consume the external Webservice.
Thanks,
Aniruddha
Thanks & Regards,
Aniruddha
Aniruddha
0
Comments
-
Check this out. Hope it helps
http://mibuso.com/blogs/ara3n/2008/03/06/0 -
The solution provided in the solution uses Automation objects which in NAV 2013 does not support.
I require solution where I can create WS as assembly file which can be used as Dotnet variable.Thanks & Regards,
Aniruddha0 -
0
-
Thanks Pawan for your prompt reply. Let me give a try.Thanks & Regards,
Aniruddha0 -
Had the same Problem, the waldo-blogpost helped me out! Pretty unexpectedly easy.
Thank you pawanAustrian NAV/BC Dev0 -
The Post really helped me. I am able to consume both external as well as WS service exposed form NAV with in NAV 2013.
Let me share my findings.
Step 1: Created a simple CodeUnit which returns a sum of two decimal value
Function : CheckSum(X : Decimal;Y : Decimal) Z : Decimal
Z:= X+Y;
//(Z as return type variable)
Step 2: Exposed the Webservice: Administration-> IT Administrator ->We Services
There Add Object Type as Codeunit, Object ID and give a service name (e.g.WSCheckSum)
Step 3: Create a Windows Class Library (WSSumCheck):
Open VS 2010 - File -> New Project - >Visual C# -> Windows - Select Class Library
In the Solution Explorer ( on the right hand side of the Window), Add "Service Reference" by Right Clicking - Advanced-> Add Web Reference -> http://10.33.xxx.xxx:7047/DynamicsNAV70 ... WSCheckSum
Provide Web Reference Name and "Add Reference". Build the Class Library ( Click Build)
Step 4: Paste the DLLs in
C:\Program Files\Microsoft Dynamics NAV\70\Service\Add-ins
C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client\Add-ins
Step 5: Web Service Call from Another CodeUnit (WSCallCheckSum)
Crate Global variables:
Name DataType
Z Decimal
SumCheck DotNet
Subtype
WSSumCheck.WebCheckSum.WSCheckSum.'WSSumCheck, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
In OnRun trigger write the following codes:
SumCheck:=SumCheck.WSCheckSum();
SumCheck.UseDefaultCredentials :=TRUE;
Z:=SumCheck.CheckSum(1,2);
MESSAGE('Sum := %1',Z);
Run the Codeunit to get reposnseThanks & Regards,
Aniruddha0
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