Oh I see, you're talking about the response from the server. Yes, the dataset request does expect an XML response back. It uses XMLHTTPDataRequest in DHTML, and something equivalent in the Flash runtime, which expects an XML reply.
What you may need to do is have the server send back an XML response with a token or a URL link which is something that the user can then click to ask the browser actually fetch the PDF file, in a way that the browser can handle using it's default mime handling capabilities. There's an API in lz.Browser.loadURL which might be the right way to force the browser to load a PDF from the server. On Fri, Oct 1, 2010 at 10:00 AM, Marco Lettere <[email protected]>wrote: > Hi Henry, > with non-xml responses I mean that upon sending an XML resource, I get back > from the server a PDF with no xml wrapping it. > So actually what I get is an Error: "Error ... client could not parse XML > from server " actually because the PDF is a binary and not an XML .... > M. > > > On 10/01/2010 03:18 PM, Henry Minsky wrote: > > You want to use the POST request type, so you do not run into any data size > limit. > > XML can contain arbitrary data, as long as it is escaped properly, so I > don't > understand what you mean by non-xml responses. Can you give an example > of the code and data that causes the problem, maybe there is a bug in the > encoding > of the data into the dataset. > > On Fri, Oct 1, 2010 at 8:23 AM, Marco Lettere > <[email protected]>wrote: > >> Hello all, >> I have the following scenario: an OL UI filling in an XML. This XML has to >> be sent to the server who generates a PDF out of the content and returns >> this PDF to the client. The browser opens the PDF with its native >> capabilities (asking for saving or opening in system pdf viewer). >> My question is very simple: how to do that? >> I was trying to use a dataset but it doesn't seem to be able to handle >> non-xml responses. Right? Anyway how can I interface then with the browser? >> I also tried to write a Javascript that does this via an Ajax request and >> the "loadJS-ing" it through lz.Browser's interface. But here I fail against >> the limit of characters imposed by the API. >> >> I'm pretty out of ideas now .... any suggestions? >> Thanks, >> M. >> > > > > -- > Henry Minsky > Software Architect > [email protected] > > > > -- Henry Minsky Software Architect [email protected]
