methodname error in dispatcher

Asked by Eric Trinh on 2017-03-24

Hi,
I'm having problem calling the service using .net HttpClient.
This is my python web service description:
{"methods": {"AddBulkItems": {"doc_lines": [], "params": {"itemIds": {"optional": false, "doc_lines": [], "type": "list", "def_order": 1}}, "ret_info": {"doc_lines": [], "type": "boolean"}}, "AddItemToWatch": {"doc_lines": [], "params": {"itemId": {"optional": false, "doc_lines": [], "type": "string", "def_order": 1}}, "ret_info": {"doc_lines": [], "type": "boolean"}}}, "servicename": "WalmartService", "url": "http://192.168.0.10:8081/WalmartService/jsonwsp", "type": "jsonwsp/description", "types": {}, "version": "1.1"}

This is the json request body:
{
  "method": {
    "AddItemToWatch": {
      "params": {
        "itemId": "151564"
      }
    }
  }
}

Then I got this response back:
{"fault": {"filename": "dispatcher", "lineno": 174, "string": "'methodname'", "code": "client", "hint": "", "detail": ["Traceback (most recent call last):", " File \"/usr/local/lib/python3.4/dist-packages/ladon/server/dispatcher.py\", line 160, in dispatch_request", " methodname = req_dict['methodname']", "KeyError: 'methodname'", ""]}, "version": "1.0", "type": "jsonwsp/fault"}

What should I send to the service?

Question information

Language:
English Edit question
Status:
Solved
For:
ladon Edit question
Assignee:
No assignee Edit question
Solved by:
Eric Trinh
Solved:
2017-03-24
Last query:
2017-03-24
Last reply:
Eric Trinh (erictrinh276) said : #1

never mind it found the sulotion:
This is what the request body looks like:
{
      "methodname": "AddItemToWatch",
      "args": {
        "itemId": "151564"
      }
}

jsgaarde (jakob-simon-gaarde) said : #2

Moved to bitbucket

Den 24. mar. 2017 4.27 PM skrev "Eric Trinh" <
<email address hidden>>:

> Question #588261 on ladon changed:
> https://answers.launchpad.net/ladon/+question/588261
>
> Status: Open => Solved
>
> Eric Trinh confirmed that the question is solved:
> never mind it found the sulotion:
> This is what the request body looks like:
> {
> "methodname": "AddItemToWatch",
> "args": {
> "itemId": "151564"
> }
> }
>
> --
> You received this question notification because your team Ladon
> Developer is an answer contact for ladon.
>
> --
> Mailing list: https://launchpad.net/~ladon-dev-team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~ladon-dev-team
> More help : https://help.launchpad.net/ListHelp
>