[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: Receving data past back from a webservice
Sender: Scott Klement <klemscot@xxxxxxxxxxxx>
> Okay - If I were just sending one long string of data to the webservice,
> and then the webservice was going to pass me back data in an xml format,
> how would I go about getting that, assuming I'll be reading it from the
> IFS? Is example15 a good one to use for that? Or do you have any other
> recommendations to help me with this?
EXAMPLE16 demonstrates sending one long string (which happens to be XML,
though you could put whatever you wanted to into the string) and receiving
the results back into the program and parsing the XML.
If you don't want HTTPAPI to parse the XML and return it to your program,
but would rather just send a long string and have the results saved to the
IFS, look at EXAMPLE4.
Again, the data that's sent happens to be XML, but HTTPAPI doesn't care
about that.. it sends whatever you tell it to send. You just have to make
sure it's in the format that the web service expects.
You'll also need to know if the web service expects the data to be sent
via HTTP POST or GET. In the paragraphs above, I'm assuming that it wants
POST.. GET is somewhat more complicated becuase you have to encode the
data into the URL itself. If you do need to make a GET request, look at
EXAMPLE14 for an example of using HTTPAPI's URL encoder routines to encode
your data and add it on to the URL.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------