Problem with 2009 R2 Web Service that should write into the database
Heinrich
Member Posts: 7
Hi,
we have some problems with WebServices that should write into the NAV database.
Our main solution (NAV 2016 / 2015 / 2013R2) recently got some enhancements with NAV WebServices. But some of our customers are still on NAV 2009 Classic Client and should also get this enhancements. Unfortunately we encounter major difficulties.
The enhancement is based on web services built with Codeunits & XMLPorts. This works like a charme im the newer NAV versions. In NAV 2009 R2 we get errors like below. I built a very small example to show the point:
Request (sent to NAV with SoapUI, based on the WSDL fom NAV):
Response:
It works if we remove all
It would be really great to get any help on this.
If you like youi nay have a look in the attached objects (from the sample above).
Table 70050
Codeunit 70050
XML Port 70050
Thanks in advance
Heinrich
we have some problems with WebServices that should write into the NAV database.
Our main solution (NAV 2016 / 2015 / 2013R2) recently got some enhancements with NAV WebServices. But some of our customers are still on NAV 2009 Classic Client and should also get this enhancements. Unfortunately we encounter major difficulties.
The enhancement is based on web services built with Codeunits & XMLPorts. This works like a charme im the newer NAV versions. In NAV 2009 R2 we get errors like below. I built a very small example to show the point:
Request (sent to NAV with SoapUI, based on the WSDL fom NAV):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tes="urn:microsoft-dynamics-schemas/codeunit/TestWebService" xmlns:x70="urn:microsoft-dynamics-nav/xmlports/x70050">
<soapenv:Header/>
<soapenv:Body>
<tes:TestFunction1>
<tes:testXMLPort>
<!--Zero or more repetitions:-->
<x70:TestTable>
<!--Optional:-->
<x70:Nr>0</x70:Nr>
</x70:TestTable>
</tes:testXMLPort>
</tes:TestFunction1>
</soapenv:Body>
</soapenv:Envelope>
Response:
<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.Types.Exceptions.NavNCLXmlPortUnexpectedElementException</faultcode>
<faultstring xml:lang="de-DE">The Element <x70:TestTable> is unexpected.</faultstring>
<detail>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">The Element <x70:TestTable> is unexpected.</string>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
It works if we remove all
x70:from the request. But, up to now, that is not possible in the original request.
It would be really great to get any help on this.
If you like youi nay have a look in the attached objects (from the sample above).
Table 70050
Codeunit 70050
XML Port 70050
Thanks in advance
Heinrich
0
Answers
-
In 2009, we use a stylesheet to remove the namespace from the xml before importing it with an xmlport.
something like...
[Build lautXmlStyleSheet]
XmlSourceDocument.transformNodeToObject(lautXmlStyleSheet, XmlDestinationDocument);
\\The truth exists in seven versions.0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
