Re: Unable to get upload results from FileUpload

2010-05-31 Thread Fahim
Hi Manuel,

I am not using GWTUpload library. You are right, It is text/xml issue.
It works fine with text/html or text/plain. I already requested server
side team to change it for me.

Thanks for your help.

Fahim

On May 29, 11:06 am, Manuel Carrasco Moñino man...@apache.org wrote:
 Note that in this example you are using gwtupload library, which is
 not the matter of this issue.

 When you use FileUpload in a FormPanel, the only way to realize the
 form has been submitted is adding a SubmitCompleteHandler to the form
 panel, in this handler you can call the method response.getResults()
 which is the html content of the iframe used to submit the form. So,
 this is the reason I pointed to use a content-type text/plain or
 text/html in the server response, using any other content-type the
 call to get the iframe content returns null in many browsers.

 You can not use the method response.getText() which is specific for
 asynchronous ajax calls using RequestCallback, and this is not the
 case.

 btw: gwtupload library is able to realize that the upload has finished
 not only when the FormPanel executes the SubmitCompleteHandler, but
 when the server notifies the client, because the client is asking
 continuously to the server to the status progress using ajax.

 Cheers
 -Manolo

 On Fri, May 28, 2010 at 4:38 PM, Jeff Chimene jchim...@gmail.com wrote:
  Hi Faim:

  Sorry, yes, you're right.

  Here is a working example:
  private final IUploader.OnFinishUploaderHandler onFinishUploaderHandler =
  new IUploader.OnFinishUploaderHandler() {
      public void onFinish(IUploader uploader) {
          if (uploader.getStatus() == Status.SUCCESS) {
    STUFF
      }
  };

  used as follows:

  /*
   * Add a finish handler which will load the image once the upload
   * ... finishes
   */
  singleUploader.addOnFinishUploadHandler(onFinishUploaderHandler);
  singleUploader.setServletPath(cgi-bin/jsupload.cgi);

  I'm still not sure where your event.getResults() comes from.

  Not to belabor the point, but do you have the server error log yet?

  On Thu, May 27, 2010 at 11:51 PM, Fahim fahimr...@gmail.com wrote:

  Hi Jeff,

  I think there isn't any response.getText() when you are using
  FileUpload widget. Is there?

  Thanks,
  Fahim

  On May 28, 2:25 am, Jeff Chimene jchim...@gmail.com wrote:
   On 05/27/2010 01:17 PM, Fahim wrote:

Hi Jeff,

Thanks for your response.

Actually server is not in my control. Though I can send request for
log file but it will take some time. And I don't think that there is
any issue on server side. We use the same service call for file upload
in our silverlight client, which we are porting to GWT now, and it
work just fine there.

I guess there is something wrong with the behavior of GWT FileUpload
control. Does it accept/return the response text of type text/xml?
May be it only supports the content type of text/html. Any ideas?

Thanks,
Fahim

On May 27, 7:05 pm, Jeff Chimene jchim...@gmail.com wrote:
Hi Fahim:

Check your server error log.

On Thu, May 27, 2010 at 1:05 AM, Fahim fahimr...@gmail.com wrote:
Hi All,

I am using FileUpload widget to upload a file. Either file is being
uploaded successfully or failed I am not able to get the results
using
event.getResults() in onSubmitComplete event because it is always
null. The response type of the service which I am calling to upload
is
text/xml. Here is the response copied from fiddler:

HTTP/1.1 200 OK
Date: Wed, 26 May 2010 19:16:42 GMT
Server: Apache
X-UA-Compatible: IE=EmulateIE7
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-
check=0
Connection: close
Content-Type: text/xml

xmlResponsestatuscode500/codemessageAn unknown system
error
occurred while processing the request./messagesubcode500/
subcode/status/xmlResponse

Any thoughts why am I not getting the above xml in in
event.getResults()?

Thanks,
Fahim

   Hi Fahim:

   I have to admit that the above puzzles me. Why are you looking in
   event.getResults()? The server response will be found in
   response.getText().
   Seehttp://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...()

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this 

Re: Unable to get upload results from FileUpload

2010-05-28 Thread Manuel Carrasco Moñino
The problem is in the response, you have to take care of two issues in
order to have event.getResults() working:
1.- You can not read the response if the server is not the same of
your application (cross domain).
2.- The content type must be text/html or text/plain.

If you had the control of the server side, I recommend using the
gwtupload library which makes it easier.

-Manolo

On Thu, May 27, 2010 at 10:05 AM, Fahim fahimr...@gmail.com wrote:
 Hi All,

 I am using FileUpload widget to upload a file. Either file is being
 uploaded successfully or failed I am not able to get the results using
 event.getResults() in onSubmitComplete event because it is always
 null. The response type of the service which I am calling to upload is
 text/xml. Here is the response copied from fiddler:

 HTTP/1.1 200 OK
 Date: Wed, 26 May 2010 19:16:42 GMT
 Server: Apache
 X-UA-Compatible: IE=EmulateIE7
 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
 check=0
 Connection: close
 Content-Type: text/xml

 xmlResponsestatuscode500/codemessageAn unknown system error
 occurred while processing the request./messagesubcode500/
 subcode/status/xmlResponse


 Any thoughts why am I not getting the above xml in in
 event.getResults()?


 Thanks,
 Fahim

 --
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to get upload results from FileUpload

2010-05-28 Thread Fahim
Hi Jeff,

I think there isn't any response.getText() when you are using
FileUpload widget. Is there?

Thanks,
Fahim

On May 28, 2:25 am, Jeff Chimene jchim...@gmail.com wrote:
 On 05/27/2010 01:17 PM, Fahim wrote:



  Hi Jeff,

  Thanks for your response.

  Actually server is not in my control. Though I can send request for
  log file but it will take some time. And I don't think that there is
  any issue on server side. We use the same service call for file upload
  in our silverlight client, which we are porting to GWT now, and it
  work just fine there.

  I guess there is something wrong with the behavior of GWT FileUpload
  control. Does it accept/return the response text of type text/xml?
  May be it only supports the content type of text/html. Any ideas?

  Thanks,
  Fahim

  On May 27, 7:05 pm, Jeff Chimene jchim...@gmail.com wrote:
  Hi Fahim:

  Check your server error log.

  On Thu, May 27, 2010 at 1:05 AM, Fahim fahimr...@gmail.com wrote:
  Hi All,

  I am using FileUpload widget to upload a file. Either file is being
  uploaded successfully or failed I am not able to get the results using
  event.getResults() in onSubmitComplete event because it is always
  null. The response type of the service which I am calling to upload is
  text/xml. Here is the response copied from fiddler:

  HTTP/1.1 200 OK
  Date: Wed, 26 May 2010 19:16:42 GMT
  Server: Apache
  X-UA-Compatible: IE=EmulateIE7
  Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
  check=0
  Connection: close
  Content-Type: text/xml

  xmlResponsestatuscode500/codemessageAn unknown system error
  occurred while processing the request./messagesubcode500/
  subcode/status/xmlResponse

  Any thoughts why am I not getting the above xml in in
  event.getResults()?

  Thanks,
  Fahim

 Hi Fahim:

 I have to admit that the above puzzles me. Why are you looking in
 event.getResults()? The server response will be found in
 response.getText(). 
 Seehttp://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...()

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to get upload results from FileUpload

2010-05-28 Thread Jeff Chimene
Hi Faim:

Sorry, yes, you're right.

Here is a working example:
private final IUploader.OnFinishUploaderHandler onFinishUploaderHandler =
new IUploader.OnFinishUploaderHandler() {
public void onFinish(IUploader uploader) {
if (uploader.getStatus() == Status.SUCCESS) {
  STUFF
}
};

used as follows:

/*
 * Add a finish handler which will load the image once the upload
 * ... finishes
 */
singleUploader.addOnFinishUploadHandler(onFinishUploaderHandler);
singleUploader.setServletPath(cgi-bin/jsupload.cgi);

I'm still not sure where your event.getResults() comes from.

Not to belabor the point, but do you have the server error log yet?

On Thu, May 27, 2010 at 11:51 PM, Fahim fahimr...@gmail.com wrote:

 Hi Jeff,

 I think there isn't any response.getText() when you are using
 FileUpload widget. Is there?

 Thanks,
 Fahim

 On May 28, 2:25 am, Jeff Chimene jchim...@gmail.com wrote:
  On 05/27/2010 01:17 PM, Fahim wrote:
 
 
 
   Hi Jeff,
 
   Thanks for your response.
 
   Actually server is not in my control. Though I can send request for
   log file but it will take some time. And I don't think that there is
   any issue on server side. We use the same service call for file upload
   in our silverlight client, which we are porting to GWT now, and it
   work just fine there.
 
   I guess there is something wrong with the behavior of GWT FileUpload
   control. Does it accept/return the response text of type text/xml?
   May be it only supports the content type of text/html. Any ideas?
 
   Thanks,
   Fahim
 
   On May 27, 7:05 pm, Jeff Chimene jchim...@gmail.com wrote:
   Hi Fahim:
 
   Check your server error log.
 
   On Thu, May 27, 2010 at 1:05 AM, Fahim fahimr...@gmail.com wrote:
   Hi All,
 
   I am using FileUpload widget to upload a file. Either file is being
   uploaded successfully or failed I am not able to get the results
 using
   event.getResults() in onSubmitComplete event because it is always
   null. The response type of the service which I am calling to upload
 is
   text/xml. Here is the response copied from fiddler:
 
   HTTP/1.1 200 OK
   Date: Wed, 26 May 2010 19:16:42 GMT
   Server: Apache
   X-UA-Compatible: IE=EmulateIE7
   Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
 pre-
   check=0
   Connection: close
   Content-Type: text/xml
 
   xmlResponsestatuscode500/codemessageAn unknown system error
   occurred while processing the request./messagesubcode500/
   subcode/status/xmlResponse
 
   Any thoughts why am I not getting the above xml in in
   event.getResults()?
 
   Thanks,
   Fahim
 
  Hi Fahim:
 
  I have to admit that the above puzzles me. Why are you looking in
  event.getResults()? The server response will be found in
  response.getText(). Seehttp://
 google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...()http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...%28%29

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Unable to get upload results from FileUpload

2010-05-27 Thread Fahim
Hi All,

I am using FileUpload widget to upload a file. Either file is being
uploaded successfully or failed I am not able to get the results using
event.getResults() in onSubmitComplete event because it is always
null. The response type of the service which I am calling to upload is
text/xml. Here is the response copied from fiddler:

HTTP/1.1 200 OK
Date: Wed, 26 May 2010 19:16:42 GMT
Server: Apache
X-UA-Compatible: IE=EmulateIE7
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
check=0
Connection: close
Content-Type: text/xml

xmlResponsestatuscode500/codemessageAn unknown system error
occurred while processing the request./messagesubcode500/
subcode/status/xmlResponse


Any thoughts why am I not getting the above xml in in
event.getResults()?


Thanks,
Fahim

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to get upload results from FileUpload

2010-05-27 Thread Jeff Chimene
Hi Fahim:

Check your server error log.

On Thu, May 27, 2010 at 1:05 AM, Fahim fahimr...@gmail.com wrote:

 Hi All,

 I am using FileUpload widget to upload a file. Either file is being
 uploaded successfully or failed I am not able to get the results using
 event.getResults() in onSubmitComplete event because it is always
 null. The response type of the service which I am calling to upload is
 text/xml. Here is the response copied from fiddler:

 HTTP/1.1 200 OK
 Date: Wed, 26 May 2010 19:16:42 GMT
 Server: Apache
 X-UA-Compatible: IE=EmulateIE7
 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
 check=0
 Connection: close
 Content-Type: text/xml

 xmlResponsestatuscode500/codemessageAn unknown system error
 occurred while processing the request./messagesubcode500/
 subcode/status/xmlResponse


 Any thoughts why am I not getting the above xml in in
 event.getResults()?


 Thanks,
 Fahim

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to get upload results from FileUpload

2010-05-27 Thread Fahim
Hi Jeff,

Thanks for your response.

Actually server is not in my control. Though I can send request for
log file but it will take some time. And I don't think that there is
any issue on server side. We use the same service call for file upload
in our silverlight client, which we are porting to GWT now, and it
work just fine there.

I guess there is something wrong with the behavior of GWT FileUpload
control. Does it accept/return the response text of type text/xml?
May be it only supports the content type of text/html. Any ideas?

Thanks,
Fahim

On May 27, 7:05 pm, Jeff Chimene jchim...@gmail.com wrote:
 Hi Fahim:

 Check your server error log.

 On Thu, May 27, 2010 at 1:05 AM, Fahim fahimr...@gmail.com wrote:
  Hi All,

  I am using FileUpload widget to upload a file. Either file is being
  uploaded successfully or failed I am not able to get the results using
  event.getResults() in onSubmitComplete event because it is always
  null. The response type of the service which I am calling to upload is
  text/xml. Here is the response copied from fiddler:

  HTTP/1.1 200 OK
  Date: Wed, 26 May 2010 19:16:42 GMT
  Server: Apache
  X-UA-Compatible: IE=EmulateIE7
  Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
  check=0
  Connection: close
  Content-Type: text/xml

  xmlResponsestatuscode500/codemessageAn unknown system error
  occurred while processing the request./messagesubcode500/
  subcode/status/xmlResponse

  Any thoughts why am I not getting the above xml in in
  event.getResults()?

  Thanks,
  Fahim

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to get upload results from FileUpload

2010-05-27 Thread Jeff Chimene
On 05/27/2010 01:17 PM, Fahim wrote:
 Hi Jeff,
 
 Thanks for your response.
 
 Actually server is not in my control. Though I can send request for
 log file but it will take some time. 

You don't have any access to the server? Even via a web management
interface? How did you install the server-side code to respond to the
upload request?

 And I don't think that there is any issue on server side. 

I must respectfully disagree. The error message clearly indicates an
error on the server. The 500 error code is generated by the http
daemon. Until you've examined the error log, there is no basis in fact
for your statement.

An unknown system error occurred while processing the request.

 We use the same service call for file upload
 in our silverlight client, which we are porting to GWT now, and it
 work just fine there.
 
 I guess there is something wrong with the behavior of GWT FileUpload
 control. 

It's not the GWT upload control.

 Does it accept/return the response text of type text/xml?

Accept: yes. That's how the upload status widget works

Return: Yes N.B. I cannot speak for the Java side of things, as I only
use the jsupload.cgi script.

 May be it only supports the content type of text/html. 

No.

Any ideas?

Yes. Check your server error logs. Additionally, are you using the
jsupload.cgi script or the Java server-side code?

 Thanks,
 Fahim

You're welcome,
Jeff

 On May 27, 7:05 pm, Jeff Chimene jchim...@gmail.com wrote:
 Hi Fahim:

 Check your server error log.

 On Thu, May 27, 2010 at 1:05 AM, Fahim fahimr...@gmail.com wrote:
 Hi All,

 I am using FileUpload widget to upload a file. Either file is being
 uploaded successfully or failed I am not able to get the results using
 event.getResults() in onSubmitComplete event because it is always
 null. The response type of the service which I am calling to upload is
 text/xml. Here is the response copied from fiddler:

 HTTP/1.1 200 OK
 Date: Wed, 26 May 2010 19:16:42 GMT
 Server: Apache
 X-UA-Compatible: IE=EmulateIE7
 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
 check=0
 Connection: close
 Content-Type: text/xml

 xmlResponsestatuscode500/codemessageAn unknown system error
 occurred while processing the request./messagesubcode500/
 subcode/status/xmlResponse

 Any thoughts why am I not getting the above xml in in
 event.getResults()?

 Thanks,
 Fahim

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.
 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Unable to get upload results from FileUpload

2010-05-27 Thread Jeff Chimene
On 05/27/2010 01:17 PM, Fahim wrote:
 Hi Jeff,
 
 Thanks for your response.
 
 Actually server is not in my control. Though I can send request for
 log file but it will take some time. And I don't think that there is
 any issue on server side. We use the same service call for file upload
 in our silverlight client, which we are porting to GWT now, and it
 work just fine there.
 
 I guess there is something wrong with the behavior of GWT FileUpload
 control. Does it accept/return the response text of type text/xml?
 May be it only supports the content type of text/html. Any ideas?
 
 Thanks,
 Fahim
 
 On May 27, 7:05 pm, Jeff Chimene jchim...@gmail.com wrote:
 Hi Fahim:

 Check your server error log.

 On Thu, May 27, 2010 at 1:05 AM, Fahim fahimr...@gmail.com wrote:
 Hi All,

 I am using FileUpload widget to upload a file. Either file is being
 uploaded successfully or failed I am not able to get the results using
 event.getResults() in onSubmitComplete event because it is always
 null. The response type of the service which I am calling to upload is
 text/xml. Here is the response copied from fiddler:

 HTTP/1.1 200 OK
 Date: Wed, 26 May 2010 19:16:42 GMT
 Server: Apache
 X-UA-Compatible: IE=EmulateIE7
 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
 check=0
 Connection: close
 Content-Type: text/xml

 xmlResponsestatuscode500/codemessageAn unknown system error
 occurred while processing the request./messagesubcode500/
 subcode/status/xmlResponse

 Any thoughts why am I not getting the above xml in in
 event.getResults()?

 Thanks,
 Fahim

Hi Fahim:

I have to admit that the above puzzles me. Why are you looking in
event.getResults()? The server response will be found in
response.getText(). See
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/http/client/Response.html#getText()

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.