Hello,
I need to continue an instance in Form Runner with the instance data stored in another server. Following the instruction at http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties/configuration-properties-form-runner#TOC-Initial-instance-posted-to-the-New- I can POST using a form in a test webpage to Form Runner and get my instance. The problem is that I also need to send a header attribute, so I try to POST the same data using Java code but it doesn't work, I'm getting various error message like "Base64 input must be a multiple of four characters" or "Invalid byte value '2'", or just a blank form with the default instance. I have checked the Base64 conversion on the client side or on the server side before sending it to Orbeon using the test webpage and it works. In short: I can't resume/modify a form using Java code and with the data on another server I need to use the header forwarding feature in Form Runner. |
Administrator
|
Could it be that spaces or line breaks in the Base64-encoded value do
not exactly match what Orbeon Forms expect? -Erik On Fri, Dec 9, 2011 at 12:01 PM, Nobry <[hidden email]> wrote: > Hello, > > I need to continue an instance in Form Runner with the instance data stored > in another server. > > Following the instruction at > http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties/configuration-properties-form-runner#TOC-Initial-instance-posted-to-the-New- > I can POST using a form in a test webpage to Form Runner and get my > instance. > > The problem is that I also need to send a header attribute, so I try to POST > the same data using Java code but it doesn't work, I'm getting various error > message like "Base64 input must be a multiple of four characters" or > "Invalid byte value '2'", or just a blank form with the default instance. > > I have checked the Base64 conversion on the client side or on the server > side before sending it to Orbeon using the test webpage and it works. > > In short: I can't resume/modify a form using Java code and with the data on > another server I need to use the header forwarding feature in Form Runner. > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Loading-initial-instance-in-a-HTTP-POST-tp4178031p4178031.html > Sent from the Orbeon Forms (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 > -- 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 |
Thanks for the reply.
I found the problem and it was not exactly about the line break: When I tried coding in Base64 on the client side: - The implementation I found give me problems when encoding accents, giving me the "Invalid byte value" On the server side: - Encoding in chunk would add \n\r at the end, this doesn't seem to be good, \n only works in my test form - An implementation of Base64 encoding doesn't seem to give me the right encoded data, I'm now using the GWT implementation. - I was missing another encoding before sending to Orbeon: url-encoding. This last point was the problem in my case. Nobry. |
Free forum by Nabble | Edit this page |