Hi Ruben,

In speaking to development the problem you are encountering it due to the apache proxy being used uses the internal name of the server when proxying the request across and hence the "host := http_request_header (http_request_header(), 'Host', null, null)" function picks up the internal name. Our demo server does not use an apache server and thus does not have this problem. We will need to make a fix to detect when a proxy request is being made and obtain the correct external proxy server name for use. It also turns our that the ^{URIQADefaultHost}^ marco cannot be called in a VSP page hence the error you are receiving as it is not meant for this purpose. So best bet in your case is to probably hard code host in the rdfdesc_http_url function of description.sql to return the correct hostname until we can provide a fix.

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support



On 16 Sep 2009, at 08:56, Ruben Martin wrote:

Quite strange. We thought we were testing with an 'external' client but it seems it is taking our internal configuration and resolving to our internal server (the same way it does when we access from an internal pc). Its encouraging though, if you get the correct links. Probably it is just a problem with some configuration. We will let you know.

With regard to our server version: Version 5.0.11.3039-pthreads as of Jul 28 2009. Our administrator guy is on vacation and we still have not been able to upgrade (so the encoding issue is unresolved yet).

Yes, we know we can use ^{URIQADefaultHost}^, for example when url- rewriting, but we dont find the way to get it from a vsp file. Using directly the macro produces a compiler error.

Thank you Hugh.

El mié, 16-09-2009 a las 01:05 +0100, Hugh Williams escribió:
Hi Ruben,


I see the problem you report with the URL provided to your external service although the hrefs of the URIs generated for the demo server are correctly referencing the external cname rather then the internal name of the machine hosting the server.


BTW, what Virtuoso server version are you using, as I gave your colleague Sergio an updated snapshot release with the latest description.vsp code (rdf mappers vad) for an issue he reported, thus are you using this:

ftp://download.openlinksw.com/support/vos/virtuoso-opensource-20090828.tar.gz


You can determine the version form the conductor or running virtuoso-t -? from command line, the server version should be 5.0.12. If not please try updating to this latest release to be in sync with what is being run on our demo server.


You can get the value of the DefaultHost using the ^ {URIQADefaultHost}^ macro as detailed at:


http://docs.openlinksw.com/virtuoso/rdfsparqlintegrationmiddleware.html#rdfviewnorthwindexample1


Let us know how you get on ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support





On 15 Sep 2009, at 15:16, Ruben Martin wrote:

Hi Ruben,
Thanks for your time Hugh
I am still unsure as to what your issue is other than the URI's you are seeing with the internal cname of the machine where created when the DefaultHost in your virtuoso.ini file was set to the internal name. Having set your DefaultHost name to the external cname if new data is inserted into the triple store do these not have the correct external cname in the URI's ?
All data have the correct cname. That's right. The problem is in the the way the href attribute of the links to other resources are formed in the script. Look at our resource in http://data.fundacionctic.org/asturias/empleo/oferta-formativa/Accion-Formativa/2009/15 . The url to other resources show the internal hostname of the virtuoso server (not accessible)
Our demo server for example (demo.openlinksw.com) has an internal hostname which is not accessible externally, but when it was setup it was given a DefaultHost name of "demo.openlinksw.com" and this all generated URIs uses this when accessed iternal or externally by the outside, see the following URL describing data stores on the server:
Your servers configuration seems to be exactly the same than ours. I suposse that when you talk about the server being setup you mean setting the DefaultHost variable in virtuosos.ini. We have already done that (DefaultHost = data.fundacionctic.org) thinking that was the right way bat it did not solve the problem. When you look at the scripts you see the urls are formed using "host := http_request_header(http_request_header(), 'Host', null, null)", got from the http headers.

Is there any way to get the value of DefaultHost from a vsp script?


http://demo.openlinksw.com/about/html/http/demo.openlinksw.com/sybasepubs2/stores/8042%23this


PS: Note the description.vsp on this machine is newer than the one you probably have but the changes are mainly in the layout, its behaviour is the same as what you would be using ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support





On 11 Sep 2009, at 07:55, Ruben Martin wrote:

El jue, 10-09-2009 a las 14:30 +0100, Hugh Williams escribió:

Hi Ruben,

What scripts are you referring, those for creating RDFViews ?

That's it. description.vsp includes other scripts such as DAV/ VAD/rdf_mappers/description.sql wich retrieves the host base name this way: host := http_request_header(http_request_header(), 'Host', null, null);

What is the incorrect URL you are seeing in the description.vsp pages and does this machine what the DefaultHost when set to at the time
these scripts were run ?

For example, if the external (accesible from the internet) server is http://data.ourserver.org, an url like http://data.ourserver.org/class/entity is redirected internally in the proxy to the virtuoso server http://data.virtuoso.org/class/entity (an intranet server), an then transformed to http://data.virtuoso.org/html/about/http://data.virtuoso.org/class/entity . The problem here is that the html view of that rdf resource rendered by description.vsp constructs the urls to other resources this way: http://data.virtuoso.org/etc.. which es not accesible for the external browser.

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support



On 10 Sep 2009, at 13:04, Ruben Martin wrote:

> Hi,
>
> We have not found in the online documentation an example to solve > this issue. We have a virtuoso instance behind an apache proxy, so > the virtuoso server is not directly accesible. All the url are being > solved-rewrited correctly (rdf -linked data) except the urls used by > the /rdfdesc/description.vsp script. This script builds the urls to
> other resources based on the internal server name.
>
> Setting the DefaultHost variable in virtuoso.ini did not solve the
> problem. is there any way to get this working ("cleaner" than
> modifying the scripts) ?
>
> Thank you.
>
>
>
> ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  
http://p.sf.net/sfu/bobj-july_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to