EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SOAPClient XML message

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#34828
Posted: 10/20/2015 09:41:11
by Tadej Gruber (Basic support level)
Joined: 10/07/2015
Posts: 4

I've been trying to find a way to create soap message directly from xml object and not the file.
I create the object by using XmlDataBinding Wizard in Rad Studio, and fill it with required data. Up until now i've created the message by first saving xml object to file and then passing the file to soap client.
Since these are unnecesary extra steps, because i have one program that creates and sends the file, i was hoping if you could help me find a way to pass XML string directly into soap message from xml object and not by file.

Thank you in advance.
#34829
Posted: 10/20/2015 09:57:40
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us.

Quote
Up until now i've created the message by first saving xml object to file and then passing the file to soap client.

The TElXMLDOMDocument class support loading from file/stream object or string data, loading from System.Xml.XmlDocument class is not supported at the moment. So, the simplest solution would be to save generated xml document into the memory stream and then load it using TElXMLSOAPClient.LoadMessage() method.
#34841
Posted: 10/21/2015 06:35:16
by Tadej Gruber (Basic support level)
Joined: 10/07/2015
Posts: 4

Thank you for such fast response.

So I use either memory stream in wich i load XML message or XMLDocument.XML (which returns xml string) and load one of these using LoadMessage() method?
#34842
Posted: 10/21/2015 06:50:03
by Dmytro Bogatskyy (EldoS Corp.)

Hi,

Quote
So I use either memory stream in wich i load XML message or XMLDocument.XML (which returns xml string) and load one of these using LoadMessage() method?

Using memory stream it would be simpler.
For using xml string, you would need to create temporary TElXMLDOMDocument object, then parse the xml string using a helper function like SBXMLUtils.ParseElementFromXMLString() and append resulting xml element to the xml document object, and then load the SOAP message from this xml document.
#34844
Posted: 10/21/2015 07:32:30
by Tadej Gruber (Basic support level)
Joined: 10/07/2015
Posts: 4

By your advice I used memory stream, since it's faster to implement, and it works like a charm.

Thank you very much for your help.
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 2374 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!