Navision 50, SOAP and XML
MrAbbey
Posts: 15
Hi @ all there,
I'm trying to develop an WebService-Connection for Navision.
Now i got a problem.
I'm using the objects from PrebenRasmussen
http://www.mibuso.com/forum/viewtopic.php?t=8782&highlight=soap and it works fine with simple data.
But I don't know how to get teh data in Navision if there are in a list or an array:
An Exampel:
How can i get this 4 items in an separated way?
The second problem is the sending of lists. The WebService is waiting for some data in an array:
This is my Code:
but i always get an Error from the WebService.
Is anyone able to help me with my Array Problems?
Thanx, Oli
I'm trying to develop an WebService-Connection for Navision.
Now i got a problem.
I'm using the objects from PrebenRasmussen
http://www.mibuso.com/forum/viewtopic.php?t=8782&highlight=soap and it works fine with simple data.
But I don't know how to get teh data in Navision if there are in a list or an array:
An Exampel:
<item xsi:type="ns1:Vt">
<vtid xsi:type="xsd:int">1</vtid>
<tid xsi:type="xsd:string">plus</tid>
<nid xsi:type="xsd:int">2</nid>
<pid xsi:type="xsd:int">6</pid>
<mkz xsi:type="xsd:float">0</mkz>
</item>
<item xsi:type="ns1:Vt">
<vtid xsi:type="xsd:int">2</vtid>
<tid xsi:type="xsd:string">minus</tid>
<nid xsi:type="xsd:int">2</nid>
<pid xsi:type="xsd:int">6</pid>
<mkz xsi:type="xsd:float">0</mkz>
</item>
<item xsi:type="ns1:Vt">
<vtid xsi:type="xsd:int">3</vtid>
<tid xsi:type="xsd:string">mal</tid>
<nid xsi:type="xsd:int">2</nid>
<pid xsi:type="xsd:int">6</pid>
<mkz xsi:type="xsd:float">0</mkz>
</item>
<item xsi:type="ns1:Vt">
<vtid xsi:type="xsd:int">4</vtid>
<tid xsi:type="xsd:string">durch</tid>
<nid xsi:type="xsd:int">2</nid>
<pid xsi:type="xsd:int">6</pid>
<mkz xsi:type="xsd:float">0</mkz>
</item>
How can i get this 4 items in an separated way?
The second problem is the sending of lists. The WebService is waiting for some data in an array:
<ArtKalkek xsi:type="urn:ArtKalkekList" soapenc:arrayType="urn:ArtKalkek[]">
This is my Code:
locautSoapSerializer.startBody;
locautSoapSerializer.startElement('SetArtvks');
locautSoapSerializer.startElement('login');
locautSoapSerializer.writeString('XXX');
locautSoapSerializer.endElement;
locautSoapSerializer.startElement('password');
locautSoapSerializer.writeString('XXX');
locautSoapSerializer.endElement;
locautSoapSerializer.startElement('ArtKalkek');
locautSoapSerializer.startElement('Item');
//Artikelid
locautSoapSerializer.startElement('artid');
locautSoapSerializer.writeString('i');
locautSoapSerializer.endElement;
//EK Preis
locautSoapSerializer.startElement('vk');
locautSoapSerializer.writeString('10');
locautSoapSerializer.endElement;
//VK Brutto
locautSoapSerializer.startElement('eadavk');
locautSoapSerializer.writeString('11');
locautSoapSerializer.endElement;
//Gültig Ab Datum
locautSoapSerializer.startElement('abDatum');
locautSoapSerializer.writeString('20071001');
locautSoapSerializer.endElement;
locautSoapSerializer.endElement;
locautSoapSerializer.endElement;
locautSoapSerializer.endElement;
locautSoapSerializer.endBody;
but i always get an Error from the WebService.
Is anyone able to help me with my Array Problems?
Thanx, Oli
0
Comments
-
What is the exact error message that you are getting back from the web service when you're sending your SOAP message?
I find that it's best to check out other Newsgroups and parts of the iNet (MSDN, Technet are good ones) to find solutions to errors with external controls.0 -
It isnt a real Error Message. The Answer from the Web Services means, that there is an Error in the data, that i sent.0
-
I got it

For the incomming Array:
XmlNode := SelectSingleNode('XYZ');
If XmlNode.hasChildNodes Then Begin
XmlNodeList := XmlNode.childNodes;
For X := 0 To XmlNodeList.length - 1 do
XmlNode1 := XmlNodeList(X);
….
end;
end;
For the outgoing data was it the correct code. The web services is case sensitive and I wrote "Item" instead of "item".
Since two Weeks I', looking for a good Book or artikel wich is explaning the MSXML.dll V5. can anyone give me a hint?
MrAbbey0
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
- 611 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