Re: Internal Server Error / DirectAction

"Jerry W. Walker" <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hi, Simon,

I suggest two things:

   * take a look at the network and Apache logs

   * if the request is getting through to your application, log the  
requests and responses.

Regards,
Jerry

On Apr 6, 2006, at 1:08 PM, Simon wrote:

> 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
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev


--
__ Jerry W. Walker,
    WebObjects Developer/Instructor for High Performance Industrial  
Strength Internet Enabled Systems

     [email protected]
     203 278-4085        office
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.