Search the Community
Showing results for tags 'xml'.
Found 4 results
-
WSDL Importer has done a great job, however, the request needs one more change ...
TrevorS posted a topic in Network, Cloud and Web
The Delphi WSDL Importer has done an impressive job of taking a (local) WSDL file and generating some very useful code (that almost works!) To debug, I have looked at the outgoing request with Fiddler, and based on this, I've been able to alter the WSDL file to effect a required change in the request header. However, the problem remains that Delphi is generating a tag with "NAV_CustomerItemPriceV1" but the server needs "ReadMultiple" - ( which seems sensible of Delphi as the resource that it uses is called NAV_CustomerItemPriceV1) Despite further manual changes to the WSDL and to the code generated by Delphi, I can't force a change in this tag. I have seen posts where people have suggested intercepting the XML, but I'm not sure how to do this (or how to access the events on THTTPRIO) TIA Incorrect: <NAV_CustomerItemPriceV1 xmlns="http://tempuri.org/"> <customerNo>account_no</customerNo> <apiKey>api_key</apiKey> <itemList> <Item No="T14727IO" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> <Item No="ZT62062-T1E0100Z" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> </itemList> </NAV_CustomerItemPriceV1> Correct: <ReadMultiple xmlns="http://tempuri.org/"> <customerNo>account_no</customerNo> <apiKey>api_key</apiKey> <itemList> <Item No="T14727IO" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> <Item No="ZT62062-T1E0100Z" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> </itemList> </ReadMultiple> -
An XML DOM with just 8 bytes per node
Erik@Grijjy posted a topic in Tips / Blogs / Tutorials / Videos
Check out some of the interesting algorithms and data structures used to create an extremely light-weight XML DOM. https://blog.grijjy.com/2020/10/07/an-xml-dom-with-just-8-bytes-per-node/ -
The .Net DLL/WSDL Import Utility for Delphi is used for importing .Net assemblies as dll files, WSDL or web service XML schema and generates Delphi classes from the types of the imported assemblies. The Import .Net Assemblies Wizard is used for importing .net assemblies and generating Delphi classes from the types of the imported assemblies. The Import WSDL/Web Services Wizard is also used for importing Web Service Description language file/url or XML schema that describes a web service and generates Delphi classes from the types of the imported WSDL assemblies. Features Import any .Net Libraries. Import any assemblies from the Global Assembly Cache (GAC). Import any Web Services Definition Language(WSDL). Uses the Host Class Library and the Framework Class library to host the .net runtime (CLR) and access the imported assemblies or WSDL without registering the .net dll as COM. For more information, go to https://crystalnet-tech.com/RuntimeLibrary/RuntimeLibUtilities. For more information about the .Net Runtime Library for Delphi (which the .Net DLL/WSDL Import Utility for Delphi is part of), go to https://www.crystalnet-tech.com/RuntimeLibrary/RuntimeLibrary4Delphi
- 10 replies
-
- .net web services
- import .net assemblies
-
(and 4 more)
Tagged with:
-
Hello, Using Delphi 10.2.3. I have attached xml file. I would like to find specific node (if it exists) in it and retrieve it's value. My node existence check list is: 1- AdditionalDocumentReference (This is an optional node. Can be more than once in XML. I have to loop through all of them to be sure that node I am searching for exists or not. If no such node exists, searched node is certainly not exists) 2- DocumentType = XSLT (I am seaching DocumentType to be "XSLT". if current node is something else, I need to check other AdditionalDocumentReference nodes if there is any) 3- EmbeddedDocumentBinaryObject (I need Base64 encoded string of that node) My current code is: uses Xml.OmniXmlDom, // <- this is for Omni XML (only available in XE7 and higher!) Xml.XmlDom, // <- add this (important, otherwise the var DefaultDOMVendor isn’t available) Using "Omni XML" as default DOM provider Xml.XmlDoc, Xml.XmlIntf; procedure DisplayInvoice(const Filename: string); var Xml: IXmlDocument; ElementNode: IXMLNode; BaseNode: IXMLNode; ChildNode: IXMLNode; XSLTBase64: string; begin if not TFile.Exists(Filename) then Exit(); Xml := TXMLDocument.Create(Filename); ElementNode := Xml.ChildNodes.FindNode('Invoice'); if ElementNode <> nil then begin BaseNode := ElementNode.ChildNodes.FindNode('cac:AdditionalDocumentReference', 'http://www.w3.org/2001/XMLSchema-instance'); // <--- here BaseNode returns nil if BaseNode <> nil then begin ChildNode := BaseNode.ChildNodes.FindNode('DocumentType'); if ChildNode <> nil then begin if ChildNode.Text.ToUpper = 'XSLT' then begin ChildNode := BaseNode.ChildNodes.FindNode('Attachment'); if ChildNode <> nil then begin ChildNode := ChildNode.ChildNodes.FindNode('EmbeddedDocumentBinaryObject'); if ChildNode <> nil then begin XSLTBase64 := ChildNode.Text; end; end; end; end; end; end; end; Above code does not take into account multiple AdditionalDocumentReference as I failed to have a working code in the first place. I have also tried not to use namespaces when using FindNode and that also failed. Any help is appreciated. Thanks & regards, Ertan ubl-tr.xml