Help ?!? [Fwd: Actions and Http Services]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Help ?!? [Fwd: Actions and Http Services]

Ingo Gambin
Ok,

spent another weekend on this problem. Using Wireshark I tracked my
information all the way from the httpservice back to the port orbeon
used to request the information from the httpservice... so the problem
that does not map the incoming data correctly (according to the
wiki-guide) seems to come from orbeon ... ?

Any ideas to this topic ?

best regards,

Ingo Gambin

eMail:            [hidden email]
PGP-Fingerprint:  D316 7343 EA4B 82C7 D96D  6917 3BF3 005A DA46 227F

Hi,

i am working with the orbeon form builder 3.7.1-2(nightly build from last monday, as 3.7.1 didnt work i tried the nightly build without success) for 2 weeks now and i like it very much.

Now with the basic structure of my actual project planned i wanted to start and make my forms... The first thing i learned was that the form builder is limited to 4 columns by default. That problem i got covered
by modifying forms.xml and adapting the corresponding stylesheet.

The next problem i could not solve so far...

I have tried to load values from a restful httpservice into a selection component... :

<!-- START PASTE EXRACT FROM FORM BUILDER SOURCE EDITOR -->
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
            xmlns:saxon="http://saxon.sf.net/"
            xmlns:xi="http://www.w3.org/2001/XInclude"
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
            xmlns:sql="http://orbeon.org/oxf/xml/sql"
            xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
            xmlns:exforms="http://www.exforms.org/exf/1-0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
            xmlns:ev="http://www.w3.org/2001/xml-events"
            xmlns:xforms="http://www.w3.org/2002/xforms">
    <xhtml:head>
        <xhtml:title>Untitled Form</xhtml:title>
        <xforms:model id="fr-form-model">

            
            <xforms:instance id="fr-form-instance">
                <form>
                    <section-1>
                        <teil1/>
                        <teil2/>
                        <teil3a/>
                        <teil3b/>
                        
                    </section-1>
                </form>
            </xforms:instance>

            
            <xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')">
                <xforms:bind id="section-1-bind" nodeset="section-1">
                    <xforms:bind id="teil1-bind" nodeset="teil1" name="teil1"/>
                    <xforms:bind id="teil2-bind" nodeset="teil2" name="teil2"/>
                    <xforms:bind id="teil3a-bind" nodeset="teil3a" name="teil3a"/>
                    <xforms:bind id="teil3b-bind" nodeset="teil3b" name="teil3b"/>
                    
                </xforms:bind>
            </xforms:bind>

            
            <xforms:instance id="fr-form-metadata" xxforms:readonly="true">
                <metadata>
                    <application-name>Berechnungsnachweis</application-name>
                    <form-name>TreeTest</form-name>
                    <title xml:lang="en">Untitled Form</title>
                    <description xml:lang="en"/>
                    <author/>
                    <logo mediatype="" filename="" size=""/>
                </metadata>
            </xforms:instance>

            
            <xforms:instance id="fr-form-attachments">
                <attachments>
                    <css mediatype="text/css" filename="" size=""/>
                    <pdf mediatype="application/pdf" filename="" size=""/>
                </attachments>
            </xforms:instance>

            
            <xforms:instance id="fr-form-resources" xxforms:readonly="true">
                <resources>
                    <resource xml:lang="en">
                        <teil1>
                            <label>Teil I</label>
                            <hint/>
                            <help/>
                            <alert/>
                        </teil1>
                        <teil2>
                            <label>Teil II</label>
                            <hint/>
                            <help/>
                            <alert/>
                        </teil2>
                        <teil3a>
                            <label>Teil IIIa</label>
                            <hint/>
                            <help/>
                            <alert/>
                        </teil3a>
                        <teil3b>
                            <label>Teil IIIb</label>
                            <hint/>
                            <help/>
                            <alert/>
                        </teil3b>
                        <section-1>
                            <label>Untitled Section</label>
                            <help/>
                        </section-1>
                        
                    </resource>
                </resources>
            </xforms:instance>

            
            <xforms:instance id="fr-service-request-instance" xxforms:exclude-result-prefixes="#all">
                <request/>
            </xforms:instance>

            <xforms:instance id="fr-service-response-instance" xxforms:exclude-result-prefixes="#all">
                <response/>
            </xforms:instance>
            <xforms:instance id="loadTeilI-instance" class="fr-service"
                             xxforms:exclude-result-prefixes="#all">
                <body>&lt;bnThemas&gt;
&lt;/bnThemas&gt;</body>
            </xforms:instance>
            <xforms:submission id="loadTeilI-submission" class="fr-service"
                               ref="instance('fr-service-request-instance')"
                               resource="http://192.168.20.200:15195/RESTfulBrilliant/resources/bnThemas/? query=SELECT%20e%20FROM%20BnThema%20e%20where%20teil%20%3D%20%27I%27%20order%20by%20thema_id"
                               method="get"
                               serialization="application/xml"
                               mediatype="application/xml"
                               replace="instance"
                               instance="fr-service-response-instance"/>
            <xforms:instance id="loadTeilII-instance" class="fr-service"
                             xxforms:exclude-result-prefixes="#all">
                <body>&lt;bnThemas&gt;
&lt;/bnThemas&gt;</body>
            </xforms:instance>
            <xforms:submission id="loadTeilII-submission" class="fr-service"
                               ref="instance('fr-service-request-instance')"
                               resource="http://192.168.20.200:15195/RESTfulBrilliant/resources/bnThemas/? query=SELECT%20e%20FROM%20BnThema%20e%20where%20teil%20%3D%20%27II%27%20order%20by%20thema_id"
                               method="get"
                               serialization="application/xml"
                               mediatype="application/xml"
                               replace="instance"
                               instance="fr-service-response-instance"/>
            <xforms:instance id="loadTeilIIIa-instance" class="fr-service"
                             xxforms:exclude-result-prefixes="#all">
                <body>&lt;bnThemas&gt;
&lt;/bnThemas&gt;</body>
            </xforms:instance>
            <xforms:submission id="loadTeilIIIa-submission" class="fr-service"
                               ref="instance('fr-service-request-instance')"
                               resource="http://192.168.20.200:15195/RESTfulBrilliant/resources/bnThemas/? query=SELECT%20e%20FROM%20BnThema%20e%20where%20teil%20%3D%20%27IIIa%27%20order%20by%20thema_id"
                               method="get"
                               serialization="application/xml"
                               mediatype="application/xml"
                               replace="instance"
                               instance="fr-service-response-instance"/>
            <xforms:instance id="loadTeilIIIb-instance" class="fr-service"
                             xxforms:exclude-result-prefixes="#all">
                <body>&lt;bnThemas&gt;
&lt;/bnThemas&gt;</body>
            </xforms:instance>
            <xforms:submission id="loadTeilIIIb-submission" class="fr-service"
                               ref="instance('fr-service-request-instance')"
                               resource="http://192.168.20.200:15195/RESTfulBrilliant/resources/bnThemas/? query=SELECT%20e%20FROM%20BnThema%20e%20where%20teil%20%3D%20%27IIIb%27%20order%20by%20thema_id"
                               method="get"
                               serialization="application/xml"
                               mediatype="application/xml"
                               replace="instance"
                               instance="fr-service-response-instance"/>

            <xforms:action id="loadTeilIData-binding">
                
                <xforms:action ev:event="xforms-ready" ev:observer="fr-form-model">
                    
                    <xforms:send submission="loadTeilI-submission"/>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit" ev:observer="loadTeilI-submission">
                    
                    <xxforms:variable name="request-instance-name" select="'loadTeilI-instance'" as="xs:string"/>
                    
                    <xforms:insert nodeset="instance('fr-service-request-instance')"
                                   origin="saxon:parse(instance($request-instance-name))"/>
                    
                    
                    <xforms:action context="instance('fr-service-request-instance')">
                        
                    </xforms:action>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit-done" ev:observer="loadTeilI-submission"
                               context="instance('fr-service-response-instance')">
                    <xforms:action class="fr-itemset-action">
                    
                        <xxforms:variable name="control-name" select="'teil1'" as="xs:string"/>
                        <xxforms:variable name="response-items" select="/bnThemas/bnThema" as="node()*"/>
                    
                        <xxforms:variable name="control-resources"
                                          select="xxforms:instance('fr-current-form-resources')/*[name() = $control-name]"/>
                        <xforms:delete nodeset="$control-resources/item"/>
                        <xforms:action xxforms:iterate="$response-items">
                            <xxforms:variable name="item-label" select="/thema" as="xs:string"/>
                            <xxforms:variable name="item-value" select="/themaId" as="xs:string"/>
                            <xforms:insert nodeset="$control-resources/*"
                                           origin="xxforms:element('item', (xxforms:element('label', xs:string($item-label)), xxforms:element('value', xs:string($item-value))))"/>
                        </xforms:action>
                    </xforms:action>
                    
                </xforms:action>
            </xforms:action>
            <xforms:action id="loadTeilIIData-binding">
                
                <xforms:action ev:event="xforms-ready" ev:observer="fr-form-model">
                    
                    <xforms:send submission="loadTeilII-submission"/>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit" ev:observer="loadTeilII-submission">
                    
                    <xxforms:variable name="request-instance-name" select="'loadTeilII-instance'" as="xs:string"/>
                    
                    <xforms:insert nodeset="instance('fr-service-request-instance')"
                                   origin="saxon:parse(instance($request-instance-name))"/>
                    
                    
                    <xforms:action context="instance('fr-service-request-instance')">
                        
                    </xforms:action>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit-done" ev:observer="loadTeilII-submission"
                               context="instance('fr-service-response-instance')">
                    <xforms:action class="fr-itemset-action">
                    
                        <xxforms:variable name="control-name" select="'teil2'" as="xs:string"/>
                        <xxforms:variable name="response-items" select="/bnThemas/bnThema" as="node()*"/>
                    
                        <xxforms:variable name="control-resources"
                                          select="xxforms:instance('fr-current-form-resources')/*[name() = $control-name]"/>
                        <xforms:delete nodeset="$control-resources/item"/>
                        <xforms:action xxforms:iterate="$response-items">
                            <xxforms:variable name="item-label" select="thema" as="xs:string"/>
                            <xxforms:variable name="item-value" select="themaId" as="xs:string"/>
                            <xforms:insert nodeset="$control-resources/*"
                                           origin="xxforms:element('item', (xxforms:element('label', xs:string($item-label)), xxforms:element('value', xs:string($item-value))))"/>
                        </xforms:action>
                    </xforms:action>
                    
                </xforms:action>
            </xforms:action>

            <xforms:action id="loadTeilIIIaData-binding">
                
                <xforms:action ev:event="xforms-ready" ev:observer="fr-form-model">
                    
                    <xforms:send submission="loadTeilIIIa-submission"/>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit" ev:observer="loadTeilIIIa-submission">
                    
                    <xxforms:variable name="request-instance-name" select="'loadTeilIIIa-instance'" as="xs:string"/>
                    
                    <xforms:insert nodeset="instance('fr-service-request-instance')"
                                   origin="saxon:parse(instance($request-instance-name))"/>
                    
                    
                    <xforms:action context="instance('fr-service-request-instance')">
                        
                    </xforms:action>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit-done" ev:observer="loadTeilIIIa-submission"
                               context="instance('fr-service-response-instance')">
                    <xforms:action class="fr-itemset-action">
                    
                        <xxforms:variable name="control-name" select="'teil3a'" as="xs:string"/>
                        <xxforms:variable name="response-items" select="/bnThemas/bnThema" as="node()*"/>
                    
                        <xxforms:variable name="control-resources"
                                          select="xxforms:instance('fr-current-form-resources')/*[name() = $control-name]"/>
                        <xforms:delete nodeset="$control-resources/item"/>
                        <xforms:action xxforms:iterate="$response-items">
                            <xxforms:variable name="item-label" select="thema" as="xs:string"/>
                            <xxforms:variable name="item-value" select="themaId" as="xs:string"/>
                            <xforms:insert nodeset="$control-resources/*"
                                           origin="xxforms:element('item', (xxforms:element('label', xs:string($item-label)), xxforms:element('value', xs:string($item-value))))"/>
                        </xforms:action>
                    </xforms:action>
                    
                </xforms:action>
            </xforms:action>
            <xforms:action id="loadTeilIIIbData-binding">
                
                <xforms:action ev:event="xforms-ready" ev:observer="fr-form-model">
                    
                    <xforms:send submission="loadTeilIIIb-submission"/>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit" ev:observer="loadTeilIIIb-submission">
                    
                    <xxforms:variable name="request-instance-name" select="'loadTeilIIIb-instance'" as="xs:string"/>
                    
                    <xforms:insert nodeset="instance('fr-service-request-instance')"
                                   origin="saxon:parse(instance($request-instance-name))"/>
                    
                    
                    <xforms:action context="instance('fr-service-request-instance')">
                        
                    </xforms:action>
                </xforms:action>
                
                <xforms:action ev:event="xforms-submit-done" ev:observer="loadTeilIIIb-submission"
                               context="instance('fr-service-response-instance')">
                    <xforms:action class="fr-itemset-action">
                    
                        <xxforms:variable name="control-name" select="'teil3b'" as="xs:string"/>
                        <xxforms:variable name="response-items" select="/bnThemas/bnThema" as="node()*"/>
                    
                        <xxforms:variable name="control-resources"
                                          select="xxforms:instance('fr-current-form-resources')/*[name() = $control-name]"/>
                        <xforms:delete nodeset="$control-resources/item"/>
                        <xforms:action xxforms:iterate="$response-items">
                            <xxforms:variable name="item-label" select="thema" as="xs:string"/>
                            <xxforms:variable name="item-value" select="themaId" as="xs:string"/>
                            <xforms:insert nodeset="$control-resources/*"
                                           origin="xxforms:element('item', (xxforms:element('label', xs:string($item-label)), xxforms:element('value', xs:string($item-value))))"/>
                        </xforms:action>
                    </xforms:action>
                    
                </xforms:action>
            </xforms:action>

        </xforms:model>
    </xhtml:head>
    <xhtml:body>
        <fr:view>
            <xforms:label ref="instance('fr-form-metadata')/title"/>
            <fr:body>
                <fr:section id="section-1-section" bind="section-1-bind">
                    <xforms:label ref="$form-resources/section-1/label"/>
                    <xforms:help ref="$form-resources/section-1/help"/>
                    <fr:grid columns="5">
                        <xhtml:tr>
                            <xhtml:td/>
                            <xhtml:td>
                                
                            </xhtml:td>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                        </xhtml:tr>
                        <xhtml:tr>
                            <xhtml:td>
                                <xforms:select1 xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns:xbl="http://www.w3.org/ns/xbl"
                                                xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
                                                appearance="xxforms:tree"
                                                bind="teil1-bind"
                                                id="teil1-control">
                                    <xforms:label ref="$form-resources/teil1/label"/>
                                    <xforms:hint ref="$form-resources/teil1/hint"/>
                                    <xforms:help ref="$form-resources/teil1/help"/>
                                    <xforms:alert ref="$fr-resources/detail/labels/alert"/>
                                    <xforms:itemset nodeset="$form-resources/teil1/item">
                                        <xforms:label ref="label"/>
                                        <xforms:value ref="value"/>
                                    </xforms:itemset>
                                </xforms:select1>
                            </xhtml:td>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                        </xhtml:tr>
                        <xhtml:tr>
                            <xhtml:td>
                                <xforms:select1 xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns:xbl="http://www.w3.org/ns/xbl"
                                                xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
                                                appearance="xxforms:tree"
                                                bind="teil2-bind"
                                                id="teil2-control">
                                    <xforms:label ref="$form-resources/teil2/label"/>
                                    <xforms:hint ref="$form-resources/teil2/hint"/>
                                    <xforms:help ref="$form-resources/teil2/help"/>
                                    <xforms:alert ref="$fr-resources/detail/labels/alert"/>
                                    <xforms:itemset nodeset="$form-resources/teil2/item">
                                        <xforms:label ref="label"/>
                                        <xforms:value ref="value"/>
                                    </xforms:itemset>
                                </xforms:select1>
                            </xhtml:td>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                        </xhtml:tr>
                        <xhtml:tr>
                            <xhtml:td>
                                <xforms:select1 xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns:xbl="http://www.w3.org/ns/xbl"
                                                xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
                                                appearance="xxforms:tree"
                                                bind="teil3a-bind"
                                                id="teil3a-control">
                                    <xforms:label ref="$form-resources/teil3a/label"/>
                                    <xforms:hint ref="$form-resources/teil3a/hint"/>
                                    <xforms:help ref="$form-resources/teil3a/help"/>
                                    <xforms:alert ref="$fr-resources/detail/labels/alert"/>
                                    <xforms:itemset nodeset="$form-resources/teil3a/item">
                                        <xforms:label ref="label"/>
                                        <xforms:value ref="value"/>
                                    </xforms:itemset>
                                </xforms:select1>
                            </xhtml:td>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                        </xhtml:tr>
                        <xhtml:tr>
                            <xhtml:td>
                                <xforms:select1 xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns="http://orbeon.org/oxf/xml/form-builder"
                                                xmlns:xbl="http://www.w3.org/ns/xbl"
                                                xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
                                                appearance="xxforms:tree"
                                                bind="teil3b-bind"
                                                id="teil3b-control">
                                    <xforms:label ref="$form-resources/teil3b/label"/>
                                    <xforms:hint ref="$form-resources/teil3b/hint"/>
                                    <xforms:help ref="$form-resources/teil3b/help"/>
                                    <xforms:alert ref="$fr-resources/detail/labels/alert"/>
                                    <xforms:itemset nodeset="$form-resources/teil3b/item">
                                        <xforms:label ref="label"/>
                                        <xforms:value ref="value"/>
                                    </xforms:itemset>
                                </xforms:select1>
                            </xhtml:td>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                            <xhtml:td/>
                        </xhtml:tr>
                    </fr:grid>
                </fr:section>
            </fr:body>
        </fr:view>
    </xhtml:body>
</xhtml:html>
<!-- END COPY PASTE EXRACT FROM FORM BUILDER SOURCE EDITOR -->

When i hit the 'TEST'-Button in the httpservice-'designer' i get an xml-string containing exactly the data i want to show, so orbeon does get the data but it does not fill the data into the selection (this time i tried single-select-trees, doesn't work with dropdowns too).

Heres the screenshots of the httpservice and the action:





From what i could gather from the Orbeon Wiki that should be how to do it right but it seems i do miss something.

If anyone would have an idea about what i am doing wrong, any help would be much appreciated. Thx in advance.


Best regards,

Ingo

eMail:            [hidden email]
PGP-Fingerprint:  D316 7343 EA4B 82C7 D96D  6917 3BF3 005A DA46 227F



--
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


--
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 (204 bytes) Download Attachment
signature.asc (204 bytes) Download Attachment