How to insert Line table in JAVA using NAV web services ?
 
            
                
                    sage                
                
                    Member Posts: 29                
            
                        
            
                    Hi,
I'm not sure is it ok to post this question in here. If not, please move this topic to somewhere else. :roll:
Now I developing application using JAVA consumes NAV2015's web services but stuck in insert data to the SalesLine table for many days.
Before JAVA, I used C# and can completely inserted the SalesLine like this...
But now in JAVA I have no idea of how to insert the SalesLine into Header. I tried the same way as I did in .NET but look like there are no method for me to put and set data from Line to Header. Actually it has one method named setSalesLines(SaleOrderLineList arg0); but the problem is SalesOrderLineList has only GET method. :-k
How can I combine all of this things together ? :-k
Thank you In advance for your attention.
                I'm not sure is it ok to post this question in here. If not, please move this topic to somewhere else. :roll:
Now I developing application using JAVA consumes NAV2015's web services but stuck in insert data to the SalesLine table for many days.

Before JAVA, I used C# and can completely inserted the SalesLine like this...
using WebService; SalesOrder_Service salesOrder; SalesOrder_Service_Service service; salesOrder = new SalesOrder_Service(); service = new SalesOrder_Service_Service(); service.UseDefaultCredentials = true; service.Create(ref salesOrder); Sales_Order_Line[] salesOrderLine = new Sales_Order_Line[1]; salesOrderLine[0] = new Sales_Order_Line(); salesOrderLine[0].Type = WebService.Type.Item; salesOrderLine[0].Document_No = salesOrder.No; // put SalesOrderLine into Header like this salesOrder.SalesLines = salesOrderLine; service.Update(ref salesOrder);
But now in JAVA I have no idea of how to insert the SalesLine into Header. I tried the same way as I did in .NET but look like there are no method for me to put and set data from Line to Header. Actually it has one method named setSalesLines(SaleOrderLineList arg0); but the problem is SalesOrderLineList has only GET method. :-k
SalesOrder soHeader = soPort.read(docNo);
//method for set SalesLines requires SalesOrderLineList variable
soHeader.setSalesLines(SaleOrderLineList arg);
// So, I created the SalesOrderLineList 
SalesOrderLineList lineList = new SalesOrderLineList();
// But.. lineList has only get method. 
lineList.getSalesOrderLine();  
// More information
// This is another class for set data to SalesLine
SalesOrderLine saleOrderline = new SalesOrderLine();
saleOrderline.setNo(docNo);
saleOrderline.setDescription("zzZ");
How can I combine all of this things together ? :-k
Thank you In advance for your attention.
0                
            Comments
- 
            Thanks team.
 We finally found. \:D/SalesOrder soHeader = soPort.read(docNo); SalesOrderLineList lineList = new SalesOrderLineList(); SalesOrderLine saleOrderline = new SalesOrderLine(); saleOrderline.setNo(docNo); saleOrderline.setDescription("zzZ"); lineList.getSalesOrderLine().add(saleOrderline); soHeader.setSalesLines(lineList);0
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
- 323 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