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
Thanks & Regards,
Aniruddha
0
Comments
http://mibuso.com/blogs/ara3n/2008/03/06/
I require solution where I can create WS as assembly file which can be used as Dotnet variable.
Aniruddha
http://dynamicsuser.net/blogs/waldo/arc ... on-no.aspx
Aniruddha
Thank you pawan
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 reposnse
Aniruddha