Hi,
I am trying to use the URLSerializer to write into a temporary file and I get a java.net.UnknownServiceException saying "protocol doesn't support output". Looking at the code, I see that URLSerializer is relying directly on java.net.URL and java.net.URLConnection... Is that possible that these classes do not support output? Eric -- GPG-PGP: 2A528005 Le premier annuaire des apiculteurs 100% XML! http://apiculteurs.info/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
Eric,
Surprising. I would think that writing would be supported. Googling for FileURLConnection, I see that many have rewritten this class from Sun to fix issues. Maybe we do need something similar? Anyway, we have been thinking for a long time that URLSerializer and FileSerializer should be unified. Maybe some code from FileSerializer can be hooked up to URLSerializer for handling the file: protocol. -Erik On Feb 8, 2008, at 3:20 AM, Eric van der Vlist wrote: > Hi, > > I am trying to use the URLSerializer to write into a temporary file > and > I get a java.net.UnknownServiceException saying "protocol doesn't > support output". > > Looking at the code, I see that URLSerializer is relying directly on > java.net.URL and java.net.URLConnection... > > Is that possible that these classes do not support output? > > Eric > -- > GPG-PGP: 2A528005 > Le premier annuaire des apiculteurs 100% XML! > http:// > apiculteurs.info/ > ------------------------------------------------------------------------ > Eric van der Vlist http://xmlfr.org http://dyomedea.com > (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax > (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema > ------------------------------------------------------------------------ Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Le vendredi 08 février 2008 à 10:12 -0800, Erik Bruchez a écrit : > Eric, > > Surprising. I would think that writing would be supported. > > Googling for FileURLConnection, I see that many have rewritten this > class from Sun to fix issues. Maybe we do need something similar? > > Anyway, we have been thinking for a long time that URLSerializer and > FileSerializer should be unified. Maybe some code from FileSerializer > can be hooked up to URLSerializer for handling the file: protocol. As a workaround, I ended up using FileSerializer and was surprised to see that it doesn't support serializing XML document straight on. Eric > -Erik > > On Feb 8, 2008, at 3:20 AM, Eric van der Vlist wrote: > > > Hi, > > > > I am trying to use the URLSerializer to write into a temporary file > > and > > I get a java.net.UnknownServiceException saying "protocol doesn't > > support output". > > > > Looking at the code, I see that URLSerializer is relying directly on > > java.net.URL and java.net.URLConnection... > > > > Is that possible that these classes do not support output? > > > > Eric > > -- > > GPG-PGP: 2A528005 > > Le premier annuaire des apiculteurs 100% XML! > > http:// > > apiculteurs.info/ > > ------------------------------------------------------------------------ > > Eric van der Vlist http://xmlfr.org http://dyomedea.com > > (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax > > (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema > > ------------------------------------------------------------------------ > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > pièce jointe document plein texte (message-footer.txt) > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Weblog: http://eric.van-der-vlist.com/blog?t=category&a=English ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
On Feb 8, 2008, at 10:38 AM, Eric van der Vlist wrote: > > Le vendredi 08 février 2008 à 10:12 -0800, Erik Bruchez a écrit : >> Eric, >> >> Surprising. I would think that writing would be supported. >> >> Googling for FileURLConnection, I see that many have rewritten this >> class from Sun to fix issues. Maybe we do need something similar? >> >> Anyway, we have been thinking for a long time that URLSerializer and >> FileSerializer should be unified. Maybe some code from FileSerializer >> can be hooked up to URLSerializer for handling the file: protocol. > > Yes, exactly. > > As a workaround, I ended up using FileSerializer and was surprised to > see that it doesn't support serializing XML document straight on. serialization from conversion. So the serializers should only handle text/binary documents. For historical reasons, some serializers do it and some don't. This would need to be harmonized. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Le vendredi 08 février 2008 à 11:02 -0800, Erik Bruchez a écrit : > On Feb 8, 2008, at 10:38 AM, Eric van der Vlist wrote: > > > > > Le vendredi 08 février 2008 à 10:12 -0800, Erik Bruchez a écrit : > >> Eric, > >> > >> Surprising. I would think that writing would be supported. > >> > >> Googling for FileURLConnection, I see that many have rewritten this > >> class from Sun to fix issues. Maybe we do need something similar? > >> > >> Anyway, we have been thinking for a long time that URLSerializer and > >> FileSerializer should be unified. Maybe some code from FileSerializer > >> can be hooked up to URLSerializer for handling the file: protocol. > > > > Yes, exactly. > > > > As a workaround, I ended up using FileSerializer and was surprised to > > see that it doesn't support serializing XML document straight on. > > This is meant to be a feature, the idea being that you always decouple > serialization from conversion. So the serializers should only handle > text/binary documents. kind of mirroring serializers? I find it kind of strange that XML documents are their own containers but OTH, this is very convenient since text and binary documents are not that frequent in pipelines... Eric -- GPG-PGP: 2A528005 Le premier annuaire des apiculteurs 100% XML! http://apiculteurs.info/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
On Feb 8, 2008, at 11:10 AM, Eric van der Vlist wrote: > > Le vendredi 08 février 2008 à 11:02 -0800, Erik Bruchez a écrit : >> On Feb 8, 2008, at 10:38 AM, Eric van der Vlist wrote: >> >>> >>> Le vendredi 08 février 2008 à 10:12 -0800, Erik Bruchez a écrit : >>>> Eric, >>>> >>>> Surprising. I would think that writing would be supported. >>>> >>>> Googling for FileURLConnection, I see that many have rewritten this >>>> class from Sun to fix issues. Maybe we do need something similar? >>>> >>>> Anyway, we have been thinking for a long time that URLSerializer >>>> and >>>> FileSerializer should be unified. Maybe some code from >>>> FileSerializer >>>> can be hooked up to URLSerializer for handling the file: protocol. >>> >>> Yes, exactly. >>> >>> As a workaround, I ended up using FileSerializer and was surprised >>> to >>> see that it doesn't support serializing XML document straight on. >> >> This is meant to be a feature, the idea being that you always >> decouple >> serialization from conversion. So the serializers should only handle >> text/binary documents. > > Hmmm... In that case, shouldn't generators do the same since they are > kind of mirroring serializers? text documents too. Maybe the best approach is to support all three options all the time: binary, text, and other XML, the latter for convenience. > I find it kind of strange that XML documents are their own containers > but OTH, this is very convenient since text and binary documents are > not > that frequent in pipelines... Yes, that tends to happen relatively infrequently. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Le samedi 09 février 2008 à 14:28 -0800, Erik Bruchez a écrit : > On Feb 8, 2008, at 11:10 AM, Eric van der Vlist wrote: > > Hmmm... In that case, shouldn't generators do the same since they are > > kind of mirroring serializers? > > Possibly ;-) In fact, the URL generator is able to produce binary and > text documents too. > > Maybe the best approach is to support all three options all the time: > binary, text, and other XML, the latter for convenience. I'd say that if we had to define all this from scratch, I'd suggest that the content should be coherent everywhere in pipelines. We could have a basic format in which everything would be enclosed in a <document> root element with media type and encoding attributes and a shortcut that allows any XML document without such a <document> root element to be considered as equivalent to <document media-type="application/xml" encoding="plain">. Note that to identify these <document> elements, they would be much better in a specific namespace... The processors could then include generic methods to transparently get the "payload" in whatever format they are. Now, is there a sufficient need to implement that in OrbeonForms, that's another question! My 0,02 € Eric -- GPG-PGP: 2A528005 Curious about Relax NG? Read my book online. http://books.xmlschemata.org/relaxng/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws signature.asc (196 bytes) Download Attachment |
Administrator
|
On Feb 11, 2008, at 11:41 PM, Eric van der Vlist wrote: > > Le samedi 09 février 2008 à 14:28 -0800, Erik Bruchez a écrit : >> On Feb 8, 2008, at 11:10 AM, Eric van der Vlist wrote: > >>> Hmmm... In that case, shouldn't generators do the same since they >>> are >>> kind of mirroring serializers? >> >> Possibly ;-) In fact, the URL generator is able to produce binary and >> text documents too. >> >> Maybe the best approach is to support all three options all the time: >> binary, text, and other XML, the latter for convenience. > > I'd say that if we had to define all this from scratch, I'd suggest > that > the content should be coherent everywhere in pipelines. > > We could have a basic format in which everything would be enclosed > in a > <document> root element with media type and encoding attributes and a > shortcut that allows any XML document without such a <document> root > element to be considered as equivalent to <document > media-type="application/xml" encoding="plain">. > > Note that to identify these <document> elements, they would be much > better in a specific namespace... > > The processors could then include generic methods to transparently get > the "payload" in whatever format they are. > > Now, is there a sufficient need to implement that in OrbeonForms, > that's > another question! probably not ;-) -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by Eric van der Vlist
Eric,
A follows-up on this thread. It turned out we did have an itch to scratch, and we have now implemented not quite that, but something that can help go in that direction: a new <mode> configuration element for oxf:url-generator. This mode allows you to force the mode, either "xml", "html", "text", or "binary". If you force the binary mode, then you can have binary data produced consistently by the processor, whatever the original content-type. Example: <p:processor name="oxf:url-generator"> <p:input name="config"> <config> <url>http://example.org/resource</url> <mode>binary</mode> </config> </p:input> <p:output name="data" id="document"/> </p:processor> <p:processor name="oxf:http-serializer"> <p:input name="config"> <config> <cache-control> <use-local-cache>false</use-local-cache> </cache-control> </config> </p:input> <p:input name="data" href="#document"/> </p:processor> A good thing about this is that the content-type of the source is forwarded between the processors, as our binary format includes the content-type. -Erik On Feb 11, 2008, at 11:41 PM, Eric van der Vlist wrote: > > Le samedi 09 février 2008 à 14:28 -0800, Erik Bruchez a écrit : >> On Feb 8, 2008, at 11:10 AM, Eric van der Vlist wrote: > >>> Hmmm... In that case, shouldn't generators do the same since they >>> are >>> kind of mirroring serializers? >> >> Possibly ;-) In fact, the URL generator is able to produce binary and >> text documents too. >> >> Maybe the best approach is to support all three options all the time: >> binary, text, and other XML, the latter for convenience. > > I'd say that if we had to define all this from scratch, I'd suggest > that > the content should be coherent everywhere in pipelines. > > We could have a basic format in which everything would be enclosed > in a > <document> root element with media type and encoding attributes and a > shortcut that allows any XML document without such a <document> root > element to be considered as equivalent to <document > media-type="application/xml" encoding="plain">. > > Note that to identify these <document> elements, they would be much > better in a specific namespace... > > The processors could then include generic methods to transparently get > the "payload" in whatever format they are. > > Now, is there a sufficient need to implement that in OrbeonForms, > that's > another question! > > My 0,02 € > > Eric > > -- > GPG-PGP: 2A528005 > Curious about Relax NG? Read my book online. > http://books.xmlschemata.org/ > relaxng/ > ------------------------------------------------------------------------ > Eric van der Vlist http://xmlfr.org http://dyomedea.com > (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax > (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema > ------------------------------------------------------------------------ Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |