url-generator

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

url-generator

Einar Moos
Here is the problem: we have a counter deployed on Tomcat with an incremental number on http://localhost/counter/increment.action : <counter>0000111</counter>

 I fail to get the value of "counter" into the main instance through the url-generator:

The xpl:

<?xml version="1.0" encoding="UTF-8"?>

<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"
    xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <p:processor name="oxf:url-generator">
     
        <p:input name="config" transform="oxf:xslt" href="oxf:/afl-TESTXML/testxml.xml">
           
            <config>
                <url>http://10.33.38.111:8080/counter/increment.action</url>
                <counter>
                    <xsl:value-of select="/instance/counter"/>
                </counter>
            </config>
        </p:input>
        <p:output name="counter" id="counter"/>
    </p:processor>
</p:config>


The instance is:

                        <xforms:instance id="TESTXML-instance">
                                <TESTXML xmlns="">
                                <DateTime/>
                                <Message xmlns="">
                                     <counter/>
                                     <notes/>
                                 </Message>
                                 </TESTXML>
                                </xforms:instance>

The "counter" binding:

            <xforms:bind nodeset="instance('TESTXML-instance')/Message/counter"
                name="counter" id="counter" value="counter" required="true()"/>

I don't receive any value, so the code is wrong :-(

My final question is: since your latest build was deployed, I can no longer find logs.

Thanks in advance, and congratulation on the great work; our favorite addition is the calender.

-- einar
Reply | Threaded
Open this post in threaded view
|

Re: url-generator

Alessandro Vernet
Administrator
Einar,

On Thu, Aug 28, 2008 at 9:55 AM, parisiana <[hidden email]> wrote:

>        <p:input name="config" transform="oxf:xslt"
> href="oxf:/afl-TESTXML/testxml.xml">
>            <!-- This is inline an transformation -->
>            <config>
>                <url>http://10.33.38.111:8080/counter/increment.action</url>
>                <counter>
>                    <xsl:value-of select="/instance/counter"/>
>                </counter>
>            </config>
>        </p:input>
>        <p:output name="counter" id="counter"/>
>    </p:processor>
> </p:config>
So here you are producing a config for the URL generator? That <counter>
element in there is misplaced. For the config to the URL generator, see:
http://www.orbeon.com/ops/doc/processors-generators-url.

Is there any reason why you don't call that counter service directly
from XForms with a submission, instead of going though an XPL that uses
the URL generator?

> My final question is: since your latest build was deployed, I can no longer
> find logs.

You might want to check the config/log4j.xml. You can see there where
the orbeon.log is written. It is setup for ../logs/orbeon.log which goes
to your Tomcat log directory if you start Tomcat from the bin directory.
If this doesn't work for you, you can change the log4j.xml and put an
absolute path there instead of ../logs/orbeon.log.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
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
Reply | Threaded
Open this post in threaded view
|

Re: url-generator

Einar Moos
Thanks Alex,

I changed the script and read about the complexity of the url-generator on list.

Is there any reason why you don't call that counter service directly
from XForms with a submission, instead of going though an XPL that uses
the URL generator?
 

Good question. Non, except that I did not know how to do it in order to set the value. Interesting idea I had been exploring today.

The reason behind this is that I have two submissions, one that saves to eXist, the other to a folder for transmission to a sftp client. The counter values don't need to be the same.

I will make sure to install the logs. Merci.

Cheers,

-- einar




Alessandro Vernet wrote
Einar,

On Thu, Aug 28, 2008 at 9:55 AM, parisiana <parisiana@gmail.com> wrote:
>        <p:input name="config" transform="oxf:xslt"
> href="oxf:/afl-TESTXML/testxml.xml">
>            
>            <config>
>                <url>http://10.33.38.111:8080/counter/increment.action</url>
>                <counter>
>                    <xsl:value-of select="/instance/counter"/>
>                </counter>
>            </config>
>        </p:input>
>        <p:output name="counter" id="counter"/>
>    </p:processor>
> </p:config>

So here you are producing a config for the URL generator? That <counter> 
element in there is misplaced. For the config to the URL generator, see:
http://www.orbeon.com/ops/doc/processors-generators-url.

Is there any reason why you don't call that counter service directly
from XForms with a submission, instead of going though an XPL that uses
the URL generator?

> My final question is: since your latest build was deployed, I can no longer
> find logs.

You might want to check the config/log4j.xml. You can see there where
the orbeon.log is written. It is setup for ../logs/orbeon.log which goes
to your Tomcat log directory if you start Tomcat from the bin directory.
If this doesn't work for you, you can change the log4j.xml and put an
absolute path there instead of ../logs/orbeon.log.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/