Login  Register

Re: RESTful Web Service in XPL

Posted by stacyladnier on Jan 21, 2010; 8:54pm
URL: https://discuss.orbeon.com/RESTful-Web-Service-in-XPL-tp1049942p1058271.html

Modified the scripts that are used to call the service after I realized the parameter values were not base64 encoded. At this point, I am not even sure I am on the right track for obtaining what I am trying to.

info.xml is now

<submission>
   <transform/>
   <xmlContents/>
</submission>


processor.xpl is now

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
             xmlns:xs="http://www.w3.org/2001/XMLSchema"
             xmlns:oxf="http://www.orbeon.com/oxf/processors">

  <p:param type="input" name="instance" debug="input_instance"/>

  <p:processor name="oxf:xforms-submission">
     <p:input name="request" href="#instance" debug="xml_input/>
     <p:input name="submission">
          <xforms:submission method="post" action="/exist/rest/db/orbeon/xquery/processTransformation.xq" xxforms:username="xxxx" xxforms:password="xxxx"/>
     </p:input>
     <p:output name="response" id="response"/>
  </p:processor>

 

</p:config>

My issue now is within the processTransformation.xq

let $posted-data := request:get-data()

trying to return $posted-data//submission/transform/text()  does not work.

Returning $posted-data//submission/transform results in
<transform>ZmdkYzJy.....</transform>

I can also do a return on $posted-data//submission/child::transform and receive the same results, but can't understand why I cannot access the text within the transform node.

In debug output, the input_instance is now:

<submission>
   <transform>ZmdkYzJy.....</transform>
   <xmlContents>Pgo8L21ldGF....</xmlContents>
</submission>