I solved the problem with another solution, but i think that the issue
is with the Content-Length of the header.
Kind Regards,
César
On Sep 28, 11:43 am, nerv82 <cfe...@gmail.com> wrote:
> Hello django experts,
>
> I'm creating a web service that returns a json application as content
> type but every time that I try to consume this with a blackberry
> application in a HttpConnection nothing is return in the inputstream.
>
> I try with another json service and it's working fine in the
> blackberry. Here is my example service, what i'm doing wrong? It's
> something about the headers in the HttpResponse?
>
> I have no clue why the httpconnection can retrieve any data of my
> django service.
>
> I hope someone can helpme.
>
> kind regards,
> César
>
> in view.py:
> def index(request, cedula):
> sapnwrfc.base.config_location = '/home/xxx/Sites/sap/sap.yml'
> sapnwrfc.base.load_config()
>
> try:
> conn = sapnwrfc.base.rfc_connect()
> #print "connection attributes: ",
> conn.connection_attributes()
> #print "discover..."
> fd = conn.discover("Z_WS_PANDA")
> #print "finished discover..."
> f = fd.create_function_call()
> f.CEDULA(str(cedula))
> f.invoke()
> bp = f.BPART.value
> pdata = f.PERSONALDATA_T.value
> feedata = f.STUDENTFEEDATA.value
> sctable = f.IT_STUDSEG_TEXT.value
> message = "Access Granted!"
> todo = {'pdata': pdata, 'feedata': feedata, 'sctable':
> sctable, 'bp': bp, 'message': message}
>
> except sapnwrf.RFCCommunicationError:
> message = "bang!"
>
> res = ''.join(['[', simplejson.dumps(todo), ']'])
> return HttpResponse(res, mimetype='application/json')
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment