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

Re: HTTPAPI - Anyone want to help a new guy



   Hi Kenny,
   It's hard to tell if you're doing this, or if it's a copy/paste error,
   so I'll ask..    are you doing something like this?
   mydata = 'POST /Optimum_Web_Service/MultiSpeak/30/MR_Server.asmx
   HTTP/1.1' + CRLF
                 + 'Host: 10.30.253.58' + CRLF
                 + 'Content-Type: text/xml; charset=utf-8' + CRLF
                  + 'Content-Length: 1999'
   ...and so forth...
   The reason I'm asking this is that I see that data (which is the HTTP
   protocol) repeated twice in your log file.  In one place, it's where
   the HTTP protocol is meant to be, as sent from HTTPAPI.  In the other
   place, it appears to be part of the data uploaded.
   If this is what's happening, please do NOT put the HTTP protocol data
   in the string you're passing to HTTPAPI.   That defeats the whole
   purpose of using HTTPAPI in the first place.  The point of HTTPAPI is
   that it takes care of handling the HTTP protocol for you so that you
   don't have to.   You just provide the actual "payload", so to speak --
   or the data that needs to be sent.  Let HTTPAPI worry about how to
   identify the data to the HTTP server.
   Your data should just be:
   myData = '<?xml ...';   etc.  It should not contain the POST method or
   the host, conntent-type, or any of tthat stuff.  That's intended to be
   provided by HTTPAPI.   If you want to specify your own values for each
   of these keywords, then you might check out the parameters of the
   http_url_post() or http_url_post_xml() APIs, since they give you the
   option to set the values of the most popular headers.
   And content-length is always calculated for you.  Definitely no need to
   specify it by hand.
   Good luck!

   On 9/14/2012 2:42 PM, Kenny Keifer wrote:

   As you can see at the bottom of the debug text file I'm getting:

   "Server was unable to process request. ---&gt; Data at the root level
   is invalid. Line 1, position 1."

   HTTP/1.1 500 Internal Server Error


   Tried with and without // HTTP_setCCSIDs(1208: 0);

   Got the same error

   This message is confidential. It may also be privileged or otherwise
   protected by work product immunity or other legal rules. If you have
   received it by mistake, please let us know by e-mail reply and delete
   it from your system; you may not copy this message or disclose its
   contents to anyone. Please send us by fax any message containing
   deadlines as incoming e-mails are not screened for response deadlines.
   The integrity and security of this message cannot be guaranteed on the
   Internet.


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[1]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

References

   1. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------