Web Connection
posting multiple xml strings in single call
Gravatar is a globally recognized avatar based on your email address. posting multiple xml strings in single call
  n/a
  All
  May 28, 2015 @ 03:25pm

Wondering what the best way to post multiple cursors converted to xml to the server from a client.

Pseudo code:
---------------------

1. select data from table1 into cursor lttable1

2. convert cursor to xml (lctable1xml)

3. select data from table2 into cursor lttable2

4. Convert to xml (lctable2xml)

ohttp = CREATEOBJECT('wwhttp')

ohttp.Addpostkey("",lctable1xml)
ohttp.Addpostkey("",lctable2xml)

ohttp.HTTPGet(<server><method>)

******************************************

My question is, how does Request.FormXML() differentiate between the two xml strings so I can parse after uploading?

Or is there a better way to post two cursors to a single server method?

Thanks,
Doug


Gravatar is a globally recognized avatar based on your email address. Re: posting multiple xml strings in single call
  Rick Strahl
  Douglas Gray
  May 28, 2015 @ 09:47pm

CursorToXml can't produce multiple cursors in a result set. I think XmlAdapter is what you want.

In Web Connection (or Client Tools) look at the wwXmlAdapter class which handles most of the common tasks for you a little bit easier:

http://www.west-wind.com/webconnection/docs/?page=_1d30rswic.htm

+++ Rick ---


Wondering what the best way to post multiple cursors converted to xml to the server from a client.

Pseudo code:
---------------------

1. select data from table1 into cursor lttable1

2. convert cursor to xml (lctable1xml)

3. select data from table2 into cursor lttable2

4. Convert to xml (lctable2xml)

ohttp = CREATEOBJECT('wwhttp')

ohttp.Addpostkey("",lctable1xml)
ohttp.Addpostkey("",lctable2xml)

ohttp.HTTPGet(<server><method>)

******************************************

My question is, how does Request.FormXML() differentiate between the two xml strings so I can parse after uploading?

Or is there a better way to post two cursors to a single server method?

Thanks,
Doug



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: posting multiple xml strings in single call
  n/a
  Rick Strahl
  Jun 4, 2015 @ 01:41am
Ok. Where can I get wwXmlAdapter? I don't see it in my version, which is < 5.0.

- Doug


CursorToXml can't produce multiple cursors in a result set. I think XmlAdapter is what you want.

In Web Connection (or Client Tools) look at the wwXmlAdapter class which handles most of the common tasks for you a little bit easier:

http://www.west-wind.com/webconnection/docs/?page=_1d30rswic.htm

+++ Rick ---


Wondering what the best way to post multiple cursors converted to xml to the server from a client.

Pseudo code:
---------------------

1. select data from table1 into cursor lttable1

2. convert cursor to xml (lctable1xml)

3. select data from table2 into cursor lttable2

4. Convert to xml (lctable2xml)

ohttp = CREATEOBJECT('wwhttp')

ohttp.Addpostkey("",lctable1xml)
ohttp.Addpostkey("",lctable2xml)

ohttp.HTTPGet(<server><method>)

******************************************

My question is, how does Request.FormXML() differentiate between the two xml strings so I can parse after uploading?

Or is there a better way to post two cursors to a single server method?

Thanks,
Doug



Gravatar is a globally recognized avatar based on your email address. Re: posting multiple xml strings in single call
  Rick Strahl
  Douglas Gray
  Jun 4, 2015 @ 07:54am

Then you have to use the raw XMLAdapter available in VFP.

+++ Rick ---



Ok. Where can I get wwXmlAdapter? I don't see it in my version, which is < 5.0.

- Doug


CursorToXml can't produce multiple cursors in a result set. I think XmlAdapter is what you want.

In Web Connection (or Client Tools) look at the wwXmlAdapter class which handles most of the common tasks for you a little bit easier:

http://www.west-wind.com/webconnection/docs/?page=_1d30rswic.htm

+++ Rick ---


Wondering what the best way to post multiple cursors converted to xml to the server from a client.

Pseudo code:
---------------------

1. select data from table1 into cursor lttable1

2. convert cursor to xml (lctable1xml)

3. select data from table2 into cursor lttable2

4. Convert to xml (lctable2xml)

ohttp = CREATEOBJECT('wwhttp')

ohttp.Addpostkey("",lctable1xml)
ohttp.Addpostkey("",lctable2xml)

ohttp.HTTPGet(<server><method>)

******************************************

My question is, how does Request.FormXML() differentiate between the two xml strings so I can parse after uploading?

Or is there a better way to post two cursors to a single server method?

Thanks,
Doug






Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

© 1996-2024