Hi!,
I'm trying to handle an exception on a WS using HTTP Services on Forms Builder, but anything that i do handle this... Thx in advance! <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:saxon="http://saxon.sf.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns:exforms="http://www.exforms.org/exf/1-0" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xhtml:head> <property as="xs:integer" name="oxf.xforms.show-recoverable-errors" value="1"/> <xhtml:title>Prueba servicio Rest</xhtml:title> <xforms:model id="fr-form-model"> <xforms:instance id="fr-form-instance"> <form> <section-1> <control-1/> <control-3/> <control-4/> </section-1> </form> </xforms:instance> <xforms:bind xmlns:dataModel="java:org.orbeon.oxf.fb.DataModel" id="fr-form-binds" ref="instance('fr-form-instance')"> <xforms:bind id="section-1-bind" name="section-1" ref="section-1"> <xforms:bind id="control-1-bind" name="control-1" ref="control-1"/> <xforms:bind name="control-3" id="control-3-bind" ref="control-3"/> <xforms:bind name="control-4" id="control-4-bind" ref="control-4"/> </xforms:bind> </xforms:bind> <xforms:instance xxforms:readonly="true" id="fr-form-metadata"> <metadata> <application-name>RestService</application-name> <form-name>RestService</form-name> <title xml:lang="en">Prueba servicio Rest</title> <description xml:lang="en">Prueba servicio Rest</description> <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="false"> <resources> <resource xml:lang="en"> <section-1> <label/> <help/> </section-1> <control-1> <label>Cod Fred</label> <hint/> <help/> <alert/> </control-1> <control-3> <label>Llama Servicio</label> <help/> <hint/> <alert/> </control-3> <control-4> <label>Resultado</label> <hint/> <help/> <alert/> </control-4> </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 xmlns:formRunner="java:org.orbeon.oxf.fr.FormRunner" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:controlOps="java:org.orbeon.oxf.fb.ControlOps" xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:xpl="java:org.orbeon.oxf.pipeline.api.FunctionLibrary" xmlns:xformsUtils="java:org.orbeon.oxf.xforms.XFormsUtils" xmlns:xf="http://www.w3.org/2002/xforms" id="ServicioRest-instance" class="fr-service" xxforms:exclude-result-prefixes="#all"> <body><iges:datosFred xmlns:iges="http://fred.data"><entradaDatosFred> <tipoDocumento>NIF</tipoDocumento> <numDocumento>01230123G</numDocumento> <codFred></codFred> </entradaDatosFred></iges:datosFred></body> </xforms:instance> <xforms:submission xmlns:formRunner="java:org.orbeon.oxf.fr.FormRunner" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:controlOps="java:org.orbeon.oxf.fb.ControlOps" xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:xpl="java:org.orbeon.oxf.pipeline.api.FunctionLibrary" xmlns:xformsUtils="java:org.orbeon.oxf.xforms.XFormsUtils" xmlns:xf="http://www.w3.org/2002/xforms" id="ServicioRest-submission" class="fr-service" ref="instance('fr-service-request-instance')" resource="http://localhost:8080/datosFred" method="get" serialization="application/xml" mediatype="application/xml" replace="instance" instance="fr-service-response-instance" xxforms:username="FRED" xxforms:password="FREDDY"> <xforms:setvalue ev:event="xforms-submit-error" ref="/control-4-control"/> </xforms:submission> <xforms:action id="llamaServicioRest-binding"> <xforms:action ev:event="DOMActivate" ev:observer="control-3-control" if="true()"> <xforms:send submission="ServicioRest-submission"/> </xforms:action> <xforms:action ev:event="xforms-submit" ev:observer="ServicioRest-submission"> <xforms:var name="request-instance-name" value="'ServicioRest-instance'" as="xs:string"/> <xforms:insert ref="instance('fr-service-request-instance')" origin="saxon:parse(instance($request-instance-name))"/> <xforms:action context="instance('fr-service-request-instance')"> <xforms:action class="fr-set-service-value-action"> <xforms:var name="control-name" value="'control-1'" as="xs:string"/> <xforms:var name="path" value="//codFred" as="xs:string"/> <xforms:setvalue ref="$path" value="instance('fr-form-instance')/*/*[name() = $control-name]"/> </xforms:action> </xforms:action> </xforms:action> <xforms:action ev:event="xforms-submit-error" ev:observer="ServicioRest-submission" context="instance('fr-service-response-instance')"> <xforms:action class="fr-set-control-value-action"> <xforms:var name="control-name" value="'control-4'" as="xs:string"/> <xforms:var name="control-value" value="//mensaje" as="xs:string"/> <xforms:setvalue ref="instance('fr-form-instance')/*/*[name() = $control-name]" value="$control-value"/> </xforms:action> </xforms:action> </xforms:action> </xforms:model> </xhtml:head> <xhtml:body> <fr:view xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:dataModel="java:org.orbeon.oxf.fb.DataModel" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline"> <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> <xhtml:tr> <xhtml:td> <xforms:input id="control-1-control" bind="control-1-bind"> <xforms:label ref="$form-resources/control-1/label"/> <xforms:hint ref="$form-resources/control-1/hint"/> <xforms:help ref="$form-resources/control-1/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:input> </xhtml:td> <xhtml:td> <xforms:trigger id="control-3-control" bind="control-3-bind"> <xforms:label ref="$form-resources/control-3/label"/> <xforms:help ref="$form-resources/control-3/help"/> <xforms:hint ref="$form-resources/control-3/hint"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:trigger> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td> <xforms:output id="control-4-control" bind="control-4-bind"> <xforms:label ref="$form-resources/control-4/label"/> <xforms:hint ref="$form-resources/control-4/hint"/> <xforms:help ref="$form-resources/control-4/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:output> </xhtml:td> <xhtml:td/> </xhtml:tr> </fr:grid> </fr:section> </fr:body> </fr:view> </xhtml:body> </xhtml:html> |
Free forum by Nabble | Edit this page |