Internal Server Error / DirectAction
Simon <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all -
i'm working on an interface to a external system which is posting an
xml file to our application. the external system http-post's the file
to a url, with the filename as the single parameter in the url - eg:
http://claney.com/cgi-bin/WebObjects/Handler.woa/wa/DirectAction/
handler?filename=EBO_DETAIL_MM_35_0000000142.xml
My handler action simply writes the file to disk, and looks like this:
public WOActionResults handoffAction() {
String result = "";
try {
String content = request().contentString();
String filename = request().formValueForKey("filename").toString();
BufferedWriter out = new BufferedWriter(new FileWriter("/Library/
Handoffs/"+filename));
out.write(content);
out.close();
result = "OK";
} catch (Exception e) {
System.out.println(e.getMessage());
result = Utilities.getStackTrace(e);
System.out.println(result);
}
Main pg = (Main)pageWithName("Main");
pg.setResponseMessage(result);
return pg;
}
However, the external system is reporting an Internal Server error:
*****2006-04-05T09:07:26:5565 Info NETWORK SERVICE@EVOLVIWEB03
*****
***** 3480 - 2773 Videcom.Utils.HttpHelper
Sending to http://claney.com/cgi-bin/WebObjects/Handler.woa/wa/
DirectAction/handoff?filename=EBO_DETAIL_MM_35_0000000142.xml
*****2006-04-05T09:07:27:1502 Error NETWORK SERVICE@EVOLVIWEB03
*****
***** 3480 - 2773 Videcom.TravelPackOnline.KernelServer.Transport
Error when HTTPing file EBO_DETAIL_MM_35_0000000142.xml to http://
claney.com/cgi-bin/WebObjects/Handler.woa/wa/DirectAction/handoff.
Exception = The remote server returned an error: (500) Internal
Server Error
Unfortunately the external system is a supplier, and therefore I have
no access to their code (and to be honest their developers are not
being too helpful). there is nothing showing in the webobjects logs.
any ideas where i start to debug this ?
thanks, simon