[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] Help sending a stream file in SOAP



Keith,

HTTPAPI knows nothing about your document. It is just a string of bytes to HTTPAPI... it has no way of knowing that you have data in the middle that you want to insert, etc.

You can code this yourself with the IFS APIs, just read the data into a variable, and then concatenate it.

Or you can write the whole thing to a stream file and use http_stmf() to send it.

But its up to you to combine the data, HTTPAPI won't do it for you.

-SK


On 3/31/2017 6:44 AM, Keith Martin wrote:

I can build a soap request, insert a variable for the data to send, but is there an easy way to insert the contents of a stream file at the VINS location?

SOAP =

'<soap:Envelope +

     xmlns:soap="http://www.w3.org/2003/05/soap-envelope"; +

     xmlns:dmv="http://xxx.yyy.org/";>+

    <soap:Header/>+

    <soap:Body>+

       <dmv:UploadUpdateFile>+

          <dmv:fileTUpload>' + %trim(VINS) +

         '</dmv:fileTUpload>+

       </dmv:UploadUpdateFile>+

       </soap:Body> +

    </soap:Envelope>';

response = http_string( 'POST': URL: SOAP: '+

   application/soap+xml;charset=UTF-8;+

   action="http://xxx.yyy.org/UploadUpdateFile";');

Thank you,

Keith




--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi