NetTalk Central

Author Topic: xFileXML: Dynamic structure for SOAP  (Read 4852 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
xFileXML: Dynamic structure for SOAP
« on: October 05, 2016, 11:56:34 PM »
Hi,

The xFile class handles SOAP wrappers for a GROUP, FILE, QUEUE and a VIEW. All of these structures are fixed at compile time. I have a requirement for this structure to be dynamic i.e. I won't know what the columns in the structure would be when I compile the app. So I would expect that the class to have a few methods through which the columns of the structure can be defined - and then the LOAD or SAVE methods can be used. Does this functionality already exist?

Thanks
Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: xFileXML: Dynamic structure for SOAP
« Reply #1 on: October 11, 2016, 11:07:06 PM »
Hi Thys,

xFiles is tightly linked to structures, so no it's not possible to have a "structureless" form of "save".
I guess one approach though would be to use the Dynamic File Driver. You could create a dynamic file (Memory driver maybe?) at runtime and then pass that to xFiles.

You don't mention if your structure is kinda like a dynamic "group" or more like a dynamic "queue", or how you plan to "tell" the program what is in the structure. More details on this might lead to a more rounded solution.

Of course XML is just text, and _creating_ (simple) XML is the easy part, so constructing it as a simple string, using StringTheory, might be the easiest way to go.

cheers
Bruce


Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: xFileXML: Dynamic structure for SOAP
« Reply #2 on: October 11, 2016, 11:33:25 PM »
Hi Bruce.

The DFD might be the way to go. The alternative would have been to manipulate the SOAP wrapper myself. Do you have any good reference to how the SOAP XML works?

Thanks
Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: xFileXML: Dynamic structure for SOAP
« Reply #3 on: October 12, 2016, 11:34:13 PM »
the SOAP part is trivial.
Take bog standard XML and just "wrap" it with something generic.
In Xfiles this is done if the .SOAPEnvelope property is on.

there are 2 boundaries;
<soap:Envelope>
  <soap:Body>
! normal xml goes here
  </soap:Body>
</soap:Envelope>