Problem in calling (HTTP web service) in sharepoint 2013 workflow

Hello,

  I am trying to use HTTP web service in  SharePoint workflow (In Designer). I am giving all required parameters still is it not working ,I am not getting any idea why it is not working?

 I have maintain the log of Response Status Code .It is showing the value BadRequest

How to resolve the Response Status Code problem in Calling HTTP web service.

Here I am giving all parameter value

[Call https://wm897.sharepoint.com/_api/web... HTTP web service with request (ResponseContent to Variable: JSONResults |ResponseHeaders to responseHeaders |ResponseStatusCode to Variable: responseCode1 )]

Call:https://wm897.sharepoint.com/_api/web/lists/getByTitle(Student)/items (.....For Retrieving all list data)

Response Content to:Variable:JSONResult(.....With Type=Dictionary)

and the JSONRequetHeader is

............

accept: String : application/json;odata=verbose

content-type: String : application/json;odata=verbose

Please suggest solution for same...!!

Thanks

Nitin

December 30th, 2013 7:36am

Hi,

According to your post, my understanding is that you failed to log of Response Status Code when using HTTP web service in  SharePoint workflow.

You need to create the Request header JSonRequestHeader using a Dictionary:

Accept : application/json;odata=verbose

Content-Type : application/json;odata=verbose

To associate the JSonRequestHeader variable, select the Call action property, set the RequestHeaders property to JSonRequestHeader.

Then Scroll to the right and the storeresponse status in a variable called responseCode. This is convenient, and something that can be written to the workflow instances statistics page using the workflow history list.

Then add a Log to History List action after the Call HTTP Web Service action and set its message to write the status code for the response to the log.

You can follow the articles to create the workflow:

http://msdn.microsoft.com/en-us/library/office/dn567558.aspx

http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

Best Regards,

Linda Li

Free Windows Admin Tool Kit Click here and download it now
December 31st, 2013 4:33am

Thanks Linda.

 According to your suggestion I have made changes and finally I have got solution.Thanks Once again

Regards,

Nitin


February 15th, 2014 8:30am

It might help you to understand working of Call Http service

https://zareensoomro.wordpress.com/2015/07/02/get-items-from-sharepoint-list-using-call-http-web-service-action-sharepoint-designer-2013/

Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2015 12:54am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics