Re: Getting Http Header info using FormPanel
Thanks Sri, I am doing the same as you suggested i.e. getting the required data in response body. Fahim On Jun 4, 2:39 pm, Sripathi Krishnan wrote: > > Is there any way I could get the http response header information here? > > No. Browsers don't allow access to response headers unless you are using > XmlHttpRequest, or you are using a plugin such as Flash. > > If you want to get back some data, return it as part of the response body. > > --Sri > > On 4 June 2010 13:56, Fahim wrote: > > > Hi All, > > > I am using FormPanel to upload a file to server. I need to get some > > information from response header after file upload completes and > > onSubmitComplete fires. Is there any way I could get the http response > > header information here? > > > 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.
Getting Http Header info using FormPanel
Hi All, I am using FormPanel to upload a file to server. I need to get some information from response header after file upload completes and onSubmitComplete fires. Is there any way I could get the http response header information here? 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
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 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 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) { > > <> > > } > > }; > > > 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 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 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 wrote: > >> > >> Hi Fahim: > > >> > >> Check your server error log. > > >> > >> On Thu, May 27, 2010 at 1:05 AM, Fahim 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 > &g
Re: Unable to get upload results from FileUpload
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 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 wrote: > >> Hi Fahim: > > >> Check your server error log. > > >> On Thu, May 27, 2010 at 1:05 AM, Fahim 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 > > >>> 500An unknown system error > >>> occurred while processing the request.500 >>> subcode> > > >>> 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
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 wrote: > Hi Fahim: > > Check your server error log. > > On Thu, May 27, 2010 at 1:05 AM, Fahim 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 > > > 500An unknown system error > > occurred while processing the request.500 > subcode> > > > 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.
Unable to get upload results from FileUpload
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 500An unknown system error occurred while processing the request.500 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: piriti xml mapping
Thanks Harald. Please let me know whenever you test it with IE8. I really need to make it work with IE. Fahim On May 12, 7:39 pm, Harald Pehl wrote: > Hi Fahim, > > Since Piriti is developed on ubuntu I didn't test it on IE. I'm using > the module "com.google.gwt.xml.XML" for the XML parsing. actually this > should work with IE. As soon as I find the time I will test the XML > parsing in IE. > > - Harald > > On 12 Mai, 14:27, Fahim wrote: > > > > > Hi Harald, > > > Thanks for your response. > > > Yes I have XmlReader in PackageContent too like this; > > > public interface PackageContentReader extends > > XmlReader {} > > public static final PackageContentReader XML = > > GWT.create(PackageContentReader.class); > > > I will also make sure that these are instantiating, though I have > > solved my problem by reading the PackageContent separately by looping > > on content's document nodes. > > > But I am facing another big issue right now. This API is not working > > at all on my IE8 browser. It doesn't read the fields in object. While > > the same code is working fine in FF3.5 and Chrome. Is there any known > > issue in IE8? > > > Thanks, > > Fahim > > > On May 10, 3:46 pm, Harald Pehl wrote: > > > > Hi, > > > > do you have an XmlReader for PackageContent? For example: > > > > public class PackageContent { > > > public interface PackageContentReader extends > > > XmlReader {} > > > public static final PackageContentReader XML = > > > GWT.create(PackageContentReader.class); > > > > ... > > > > } > > > > Sometimes it is also necessary to setup the registry of xml readers, > > > which is used internally. The easiest way to do this is to make sure > > > that the static XmlReader constants are instantiated (this is one > > > drawback, I'm currently working on): > > > > ... > > > new CourierPackage(); > > > new PackageContent(); > > > ... > > > > HTH > > > - Harald > > > > On 8 Mai, 09:52, Fahim wrote: > > > > > Hi all, > > > > > I am using piriti framework in my GWT app for xml mapping. I have an > > > > xml structure like this; > > > > > > > > > > > > > 6480007 > > > > Test Package for Download Wizard > > > > > > > > > > > > 481291027 > > > > dead-fly-art-01 > > > > 124146 > > > > > > > > > > > > 481293027 > > > > dead-fly-art-03 > > > > 99221 > > > > > > > > > > > > > > > > > > > > > I am mapping the above xml to my pojo like this: > > > > > public class CourierPackage { > > > > > public interface CourierPackageReader extends > > > > XmlReader {} > > > > public static final CourierPackageReader XML = > > > > GWT.create(CourierPackageReader.class); > > > > > @XmlField long id; > > > > @XmlField String name; > > > > @XmlField("contents/document") List > > > > packageContents; > > > > > } > > > > > I tried to read it like this in onResponseReceived: > > > > > List pkgs = CourierPackage.XML.readList(responseDoc, > > > > "package"); > > > > CourierPackage pkg = pkgs.get(0); > > > > > Now what it is doing that it is reading the CourierPackage fields like > > > > id, name correctly but it is not reading the contents in > > > > packageContents List. > > > > > Any ideas what is wrong here. > > > > > 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 > > > > athttp://groups.google.com/group/google-web-toolkit?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > &
Re: piriti xml mapping
Hi Harald, Thanks for your response. Yes I have XmlReader in PackageContent too like this; public interface PackageContentReader extends XmlReader {} public static final PackageContentReader XML = GWT.create(PackageContentReader.class); I will also make sure that these are instantiating, though I have solved my problem by reading the PackageContent separately by looping on content's document nodes. But I am facing another big issue right now. This API is not working at all on my IE8 browser. It doesn't read the fields in object. While the same code is working fine in FF3.5 and Chrome. Is there any known issue in IE8? Thanks, Fahim On May 10, 3:46 pm, Harald Pehl wrote: > Hi, > > do you have an XmlReader for PackageContent? For example: > > public class PackageContent { > public interface PackageContentReader extends > XmlReader {} > public static final PackageContentReader XML = > GWT.create(PackageContentReader.class); > > ... > > } > > Sometimes it is also necessary to setup the registry of xml readers, > which is used internally. The easiest way to do this is to make sure > that the static XmlReader constants are instantiated (this is one > drawback, I'm currently working on): > > ... > new CourierPackage(); > new PackageContent(); > ... > > HTH > - Harald > > On 8 Mai, 09:52, Fahim wrote: > > > > > Hi all, > > > I am using piriti framework in my GWT app for xml mapping. I have an > > xml structure like this; > > > > > > > 6480007 > > Test Package for Download Wizard > > > > > > 481291027 > > dead-fly-art-01 > > 124146 > > > > > > 481293027 > > dead-fly-art-03 > > 99221 > > > > > > > > > > > I am mapping the above xml to my pojo like this: > > > public class CourierPackage { > > > public interface CourierPackageReader extends > > XmlReader {} > > public static final CourierPackageReader XML = > > GWT.create(CourierPackageReader.class); > > > @XmlField long id; > > @XmlField String name; > > @XmlField("contents/document") List packageContents; > > > } > > > I tried to read it like this in onResponseReceived: > > > List pkgs = CourierPackage.XML.readList(responseDoc, > > "package"); > > CourierPackage pkg = pkgs.get(0); > > > Now what it is doing that it is reading the CourierPackage fields like > > id, name correctly but it is not reading the contents in > > packageContents List. > > > Any ideas what is wrong here. > > > 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 > > athttp://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 > athttp://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.
piriti xml mapping
Hi all, I am using piriti framework in my GWT app for xml mapping. I have an xml structure like this; 6480007 Test Package for Download Wizard 481291027 dead-fly-art-01 124146 481293027 dead-fly-art-03 99221 I am mapping the above xml to my pojo like this: public class CourierPackage { public interface CourierPackageReader extends XmlReader {} public static final CourierPackageReader XML = GWT.create(CourierPackageReader.class); @XmlField long id; @XmlField String name; @XmlField("contents/document") List packageContents; } I tried to read it like this in onResponseReceived: List pkgs = CourierPackage.XML.readList(responseDoc, "package"); CourierPackage pkg = pkgs.get(0); Now what it is doing that it is reading the CourierPackage fields like id, name correctly but it is not reading the contents in packageContents List. Any ideas what is wrong here. 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.