FR: Can control values be used in HTTP Service Request Body?

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

FR: Can control values be used in HTTP Service Request Body?

Tom McLeod
In Form Builder, if an HTTP Service is added that calls a web service that accepts parameters, can the parameter be a control's value?

I have a control that's initialized from an HTTP Header. I'm trying to pass that value to a web service call configured as an Action on Form Load.

As you can see, I'm trying to use the $control-name syntax in the Request Body, which doesn't seem to work. How can this be done?

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetRegistrationFormInfo xmlns="http://www.example.com/webservices/">
      <facilityId>$facility-id</facilityId>
    </GetRegistrationFormInfo>
  </soap:Body>
</soap:Envelope>

Thanks,
Tom
Reply | Threaded
Open this post in threaded view
|

Re: FR: Can control values be used in HTTP Service Request Body?

Erik Bruchez
Administrator
Tom,

In this case, use "Set Service Request Values":

http://wiki.orbeon.com/forms/doc/user-guide/form-builder-user-guide#TOC-Passing-parameters-to-the-service

Specify as XPath expression:

   /soap:Envelope/soap:Body/facilityId

or, if you have only one facilityId in the form:

   //facilityId

-Erik

On Jun 18, 2009, at 6:20 AM, Tom McLeod wrote:

>
> In Form Builder, if an HTTP Service is added that calls a web  
> service that
> accepts parameters, can the parameter be a control's value?
>
> I have a control that's initialized from an HTTP Header. I'm trying  
> to pass
> that value to a web service call configured as an Action on Form Load.
>
> As you can see, I'm trying to use the $control-name syntax in the  
> Request
> Body, which doesn't seem to work. How can this be done?
>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body>
>    <GetRegistrationFormInfo xmlns="http://www.example.com/ 
> webservices/">
>      <facilityId>$facility-id</facilityId>
>    </GetRegistrationFormInfo>
>  </soap:Body>
> </soap:Envelope>
>
> Thanks,
> Tom
> --
> View this message in context: http://www.nabble.com/FR%3A-Can-control-values-be-used-in-HTTP-Service-Request-Body--tp24092845p24092845.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



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