Non-SOAP request: Can't find the way to read file data? http POST using "application/x-www-form-urlencoded"

shamim40.yahoo.com's picture
Hi, I am trying to evaluate this framework "Web Services Framework for C++. I was trying to test a simple RESTful http POST using curl which has the file attachment. The tcp wireshark dump as below... WireShark: POST /axis2/services/sa/sa_post HTTP/1.1.. User-Agent: curl/7.15.1 (x86_64-suse-linux) libcurl/7.15.1 ..Host: 10.2.20.154:9090..Accept: */* ..Content-Length: 23..Content-Type: application/x-www-form-urlencoded....This is my test file... Your framework API wrapper seems to me is only processing node based (xml) requests... It doesn't seem to me that it supports multipart/form-data... Then i tried to post as "application/x-www-form-urlencoded" and the http server accepts this request. But i can't find the way to read the data. I tried to use OMDataHandler but it looks like designed to be used only with SOAP message. My requirement: I want to just store a file to the disk which was sent through http POST using "application/x-www-form-urlencoded"... If this can be done using this framwork, then how? I will appreciate your response. Thanks, Shamim
nandika's picture

Re

Axis2/C will process application/x-www-form-urlencoded content type as a rest request. Hence what ever the data you should send will be available within the targeted services invoke method. However, this functionality is not tested. Regards nandika