Codeunit XMLPort Webservice - strange behaviour

jayleferm
Member Posts: 13
Hello folks,
I've created a XMLPort, avaiable as a webservice via a codeunit (standard functions). The call of the webservice should create one record and respond with the number of the number series and the validated information from the created record.
When I call the webservice via SoapUI or BizTalk, the respond works properly and it creates one record with the data I've sent, but unfortunately it creates a second record with empty information, too.
This is the codeunit:
XMLPort:
I've tried to set the MaxOccurs setting to Once in the XMLPort, but then I receive another error message that the record occurred more than once. I've also tried to remove the IMPORT function, but then nothing will be created. I guess that the call of the XMLPort by the codeunit adds two node elements, but I don't know how to solve this.
I'm using NAV 2009 R2 with Build 34087
I've created a XMLPort, avaiable as a webservice via a codeunit (standard functions). The call of the webservice should create one record and respond with the number of the number series and the validated information from the created record.
When I call the webservice via SoapUI or BizTalk, the respond works properly and it creates one record with the data I've sent, but unfortunately it creates a second record with empty information, too.
This is the codeunit:
CreateRecord(VAR createRecord : XMLport "Create Record") : Text[1000] CLEARLASTERROR; IF NOT createRec.IMPORT THEN BEGIN ERROR(GETLASTERRORTEXT); END ELSE BEGIN createRec.GetNo(locRecNo); locRecord.SETRANGE("No.",locRecNo); locRecord.FINDLAST; createRec.SETTABLEVIEW(locRecord); EXIT('created Record:'+ locRecNo); END;
XMLPort:
Record - Import::OnAfterInsertRecord() gNumber := Record."No."; [...] GetNo(VAR pNumber : Code[20]) pNumber := gNumber;
I've tried to set the MaxOccurs setting to Once in the XMLPort, but then I receive another error message that the record occurred more than once. I've also tried to remove the IMPORT function, but then nothing will be created. I guess that the call of the XMLPort by the codeunit adds two node elements, but I don't know how to solve this.
I'm using NAV 2009 R2 with Build 34087
0
Answers
-
It seems that this is a bug regarding to this build number.
I've updated the webservice on the NST to the latest version and it works now. \:D/0 -
Great! Thanks for sharing the feedback for the solution!
Tino Ruijs
Microsoft Dynamics NAV specialist0
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