I'm afraid this issue may have been covered before, but I wasn't able to find a solution. Here is my configuration:
1) orbeon is deployed in my JBoss AS under /orbeon, as standard. 2) I have deployed my own webapp under /pm-webapp. Here I have an xpl (/pm-webapp/eod/controller/process-questions.xpl) and an .xslt for transforming my views. Here is the .xpl: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <p:param name="data" type="output"/> <p:processor name="oxf:xforms-submission"> <p:input name="submission"> <xforms:submission method="post" action="http://localhost:8080/pm-webapp/eod/retrieveData"/> </p:input> <p:input name="request"> <dummy xmlns=""/> </p:input> <p:output name="response" id="questionAnswerXML" debug="question XML"/> </p:processor> <p:processor name="oxf:xslt"> <p:input name="config" href="http://localhost:8080/pm-webapp/eod/forms/view.xsl"/> <p:input name="data" href="#questionAnswerXML"/> <p:output name="data" ref="data" debug="translated xform"/> </p:processor> </p:config> Since this .xpl is processed by the orbeon webapp, I had to use an absolute URL to point back to my own webapp. Is there a way to work around this, say with URL rewriting or something? I can't really hardcode an absolute URL on every app-server when we get this into production. Thanks for your help. Alec |
Anybody? I still haven't found a workaround..
|
We had a similar issue solved by creating the full path dynamically using first
the request processor to get scheme, server name and port and then concatenating this data. <!-- get required data from request --> <p:processor name="oxf:request"> <p:input name="config"> <config> <include>/request/scheme</include> <include>/request/server-name</include> <include>/request/server-port</include> </config> </p:input> <p:output name="data" id="requestInfo"/> </p:processor> <!--create resource url --> <xforms:variable name="resourceURL" select="concat(instance('requestInfo')/scheme,'://', instance('requestInfo')/server,':', instance('requestInfo')/port, '/your/url')" /> HTH Jeroen AlecL schreef: > Anybody? I still haven't found a workaround.. > > > AlecL wrote: >> I'm having to hardcode an absolute URL in my .xpl, and I'm not sure how to >> get around it. Here is my configuration: >> >> 1) orbeon is deployed in my JBoss AS under /orbeon, as standard. >> >> 2) I have deployed my own webapp under /pm-webapp. Here I have an xpl >> (/pm-webapp/eod/controller/process-questions.xpl) and an .xslt for >> transforming my views. >> >> Here is the .xpl: >> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >> xmlns:oxf="http://www.orbeon.com/oxf/processors" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> >> >> <p:param name="data" type="output"/> >> >> >> <!-- retrieve the Question XML file --> >> <p:processor name="oxf:xforms-submission"> >> <p:input name="submission"> >> <xforms:submission method="post" >> action="http://localhost:8080/pm-webapp/eod/retrieveData"/> >> </p:input> >> <p:input name="request"> >> <dummy xmlns=""/> >> </p:input> >> <p:output name="response" id="questionAnswerXML" debug="question >> XML"/> >> </p:processor> >> >> <!-- Do the XSL translation on the model, outputting the xform --> >> <p:processor name="oxf:xslt"> >> <p:input name="config" >> href="http://localhost:8080/pm-webapp/eod/forms/view.xsl"/> >> <p:input name="data" href="#questionAnswerXML"/> >> <p:output name="data" ref="data" debug="translated xform"/> >> </p:processor> >> </p:config> >> >> Since this .xpl is processed by the orbeon webapp, I had to use an >> absolute URL to point back to my own webapp. Is there a way to work >> around this, say with URL rewriting or something? I can't really hardcode >> an absolute URL on every app-server when we get this into production. >> >> Thanks for your help. >> Alec >> > -- 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 |
I figured this out by using the request processor in tandem with a sub-pipeline, which is basically my old pipeline with an xsl translation. Thanks for the hint, Jeroen.
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <p:param name="data" type="output"/> <p:processor name="oxf:request"> <p:input name="config"> <config> <include>/request/scheme</include> <include>/request/server-name</include> <include>/request/server-port</include> </config> </p:input> <p:output name="data" id="requestInfo" debug="requestStr"/> </p:processor> <p:processor name="oxf:xslt"> <p:input name="config"> <prefix xsl:version="2.0"><xsl:value-of select="/request/scheme"/>://<xsl:value-of select="/request/server-name"/>:<xsl:value-of select="/request/server-port"/>/context-path/</prefix> </p:input> <p:input name="data" href="#requestInfo"/> <p:output name="data" id="parsedURL" debug="parsed URL"/> </p:processor> <p:processor name="oxf:xslt"> <p:input name="data" href="#parsedURL"/> <p:input name="config"> <p:config xsl:version="2.0"> <xsl:variable name="serverPrefix"> <xsl:value-of select="/prefix"/> </xsl:variable> <p:param name="data" type="output"/> <p:processor name="oxf:xforms-submission"> <p:input name="submission"> <xforms:submission method="post" action="{$serverPrefix}/eod/retrieveData"/> </p:input> <p:input name="request"> <dummy xmlns=""/> </p:input> <p:output name="response" id="questionAnswerXML" debug="question XML"/> </p:processor> <p:processor name="oxf:xslt"> <p:input name="config" href="{$serverPrefix}/eod/forms/view.xsl"></p:input> <p:input name="data" href="#questionAnswerXML"/> <p:output name="data" ref="data" debug="translated xform"/> </p:processor> </p:config> </p:input> <p:output name="data" id="subPipeline" debug="new pipeline"/> </p:processor> <p:processor name="oxf:pipeline"> <p:input name="config" href="#subPipeline"/> <p:output name="data" ref="data"/> </p:processor> </p:config> This seems unnecessarily complicated, but it works.
|
Free forum by Nabble | Edit this page |