I'm not sure what you're asking. Are you saying you have a STAX job that uses a <stafcmd> to submit a REQUEST/DOGET/DOPOST URL request to the HTTP service? Or do you have a Java program that uses the STAF Java APIs to submit a REQUEST/DOGET/DOPOST URL request to the HTTP service?
Either way, as documented in the STAF HTTP Service User's Guide at http://staf.sourceforge.net/current/Http.html#Request, the return code (RC) will be 0 if successful. If not successful, if an HTTP Client or Server error occurs (HTTP Status code of 4XX or 5XX) and IGNOREERRORS was not specified, then the STAF return code will be 4000 plus the HTTP status code. For example, if the response had a status code of 501 the STAF return code would be 4501. All other return codes from REQUEST are documented in "HTTP Error Code Reference".
If successful, the result buffer will contain a marshalled <Map:STAF/Service/HTTP/HttpResultMapClass> representing the output of the HTTP response upon completion. The map is defined in the "Results" subsection at http://staf.sourceforge.net/current/Http.html#Request and contains:
- The "Status Code" value is set to HTTP status code from the HTTP response, or <None> if NOSTATUS was specified in the request.
- The "Status Message" value is set to the HTTP status message from the HTTP response, or <None> if no message was provided or if NOSTATUS was specified in the request.
- The "Headers" value is set to a map containing all the HTTP headers in the HTTP response, or <None> if RETURNHEADERS was not specified in the request.
- The "Content" value is set to the HTTP response body, or <None> if RETURNNOCONTENT was specified in the request.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What if i have a XML file which request a URL and STAFResult will be send to java.
Now java program should tell either test is pass or fail ??
I'm not sure what you're asking. Are you saying you have a STAX job that uses a <stafcmd> to submit a REQUEST/DOGET/DOPOST URL request to the HTTP service? Or do you have a Java program that uses the STAF Java APIs to submit a REQUEST/DOGET/DOPOST URL request to the HTTP service?
Either way, as documented in the STAF HTTP Service User's Guide at http://staf.sourceforge.net/current/Http.html#Request, the return code (RC) will be 0 if successful. If not successful, if an HTTP Client or Server error occurs (HTTP Status code of 4XX or 5XX) and IGNOREERRORS was not specified, then the STAF return code will be 4000 plus the HTTP status code. For example, if the response had a status code of 501 the STAF return code would be 4501. All other return codes from REQUEST are documented in "HTTP Error Code Reference".
If successful, the result buffer will contain a marshalled <Map:STAF/Service/HTTP/HttpResultMapClass> representing the output of the HTTP response upon completion. The map is defined in the "Results" subsection at http://staf.sourceforge.net/current/Http.html#Request and contains:
- The "Status Code" value is set to HTTP status code from the HTTP response, or <None> if NOSTATUS was specified in the request.
- The "Status Message" value is set to the HTTP status message from the HTTP response, or <None> if no message was provided or if NOSTATUS was specified in the request.
- The "Headers" value is set to a map containing all the HTTP headers in the HTTP response, or <None> if RETURNHEADERS was not specified in the request.
- The "Content" value is set to the HTTP response body, or <None> if RETURNNOCONTENT was specified in the request.