How to pass NSData object to a DA from a form submit?
How to pass NSData object to a DA from a form submit?
- Subject: How to pass NSData object to a DA from a form submit?
- From: William Hatch <email@hidden>
- Date: Fri, 14 Nov 2008 11:45:24 -0500
I'm creating a testing component that can simulate a POST request to
one of the app's DA's. The DA currently works no problem, I just need
to simulate what the client does when it makes a request to this
action within a test app that's in wo; that way we can mess around
with parameters, etc prior to submitting the test data. One of these
parameters represents a serialized, compressed and Base64 encoded
object graph as data. I'm able to recreate that object graph, compress
and encode it into an NSData object, but I'm not sure how to get that
object into my request on the form submit that calls my DA. Since
Base64 is really a textual representation of data, I've tried creating
a String from the NSData's bytes and binding that to a WOTextField,
but that doesn't work. What's the best way to accomplish this? Is
there some WO form element I can bind a data object to such that the
request will contain a valid parameter containing it? Or, should I go
ahead and create the entire request by hand within the body of a
component action or DA that then invokes the DA I want this request
targeted at? Thanks.
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden