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

RE: CGIDEV2 of HTTP API ?



Many thanks Scott !
You're right I miss the header.


Alain RUAS
Technical Manager
 
-----Message d'origine-----
De : ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] De la part de Scott Klement
Envoyé : mercredi 29 décembre 2010 20:13
À : ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Objet : Re: CGIDEV2 of HTTP API ?

Hello Alain,

CGIDEV2 should work fine.  (HTTPAPI doesn't know or care what software 
you're running on the server.)

If your program isn't returning the expected result, then troubleshoot 
it and see what the problem is...?    Just looking at the little bit of 
code you provided, it doesn't look like you are sending any CGI headers? 
  Maybe you just didn't post that part?

But, a CGI program has to start with headers (most commonly, 
content-type) followed by a blank line.  So maybe you need this:

/$SbAd
   Content-type: text/xml

   <?xml version="1.0" encoding="utf-8"?>
   <airworthiness>
   <partnum>%partnum%</partnum>
     <serial>%serial%</serial>
     <status>%status%</status>
     <message>%message%</message>
   </airworthiness>

But, maybe you're already doing that elsewhere, I don't know... at any 
rate, your question doesn't seem to be about HTTPAPI, it seems to be 
about CGIDEV2.  (you'd get the same result with a browser, or any other 
HTTP tool.)


On 12/29/2010 5:15 AM, Alain RUAS wrote:
>
>     -          SAP send a request
>     ([2]http://myiSeries/apachedft/check_something?partnum=PN123456
>
>     -          My iSeries send an XML response
>
>     /$SbAd
>     <?xml version="1.0" encoding="utf-8"?>
>     <airworthiness>
>       <partnum>%partnum%</partnum>
>       <serial>%serial%</serial>
>       <status>%status%</status>
>       <message>%message%</message>
>     </airworthiness>
>
>
>     I try to use CGIDEV2 to do this, but ... I receive an HTTP error 500
>
>     Like if  "callp     wrtsection('sbad *fini')" do not accept to send
>     XML back to the browser.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
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
-----------------------------------------------------------------------