cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a REST service

Graeme__Tacon
Level 6
Has anyone had any success in getting Blue Prism to make calls to a RESTful service ?
4 REPLIES 4

venkata_parvata
Level 3
Hi Tacon Any success on above implementation if so would you share steps

venkata_parvata
Level 3
Does Restful webservices support for BluePrism 4.2 Version , Any articles ?

Graeme__Tacon
Level 6
Hi, Yes, we have managed to call a RESTful service with a code stage, xml below. Graeme 2ba17e26-49eb-43ed-84dd-c40e67e990b0 Application Application unknown False 0 0 1 -195 -105 150 90 15 15 60 30 15 -45 60 30 482b3ff7-096a-4713-a8c9-0c57f38f2cf9 If useProxy Then Dim proxyURI As New Uri(proxyURL) Dim proxy As New WebProxy(proxyURI, True) Dim proxyCred As New NetworkCredential(Username, Password) Dim credCache As New CredentialCache() credCache.Add(proxyURI, AuthorizationType, proxyCred) proxy.UseDefaultCredentials = False proxy.Credentials = credCache request.Proxy = proxy Else If Username"""" Then Dim Authorization As String = AuthorizationType & "" username="" & Username & "",password="" & Password request.Headers(""Authorization"") = Authorization.ToString End If End If request.Method = ""POST"" request.ContentType = ""application/json"" Dim requestStream As IO.Stream = request.GetRequestStream() Using sw As New IO.StreamWriter(requestStream, New Text.UTF8Encoding(False)) sw.Write(json) End Using Using response As WebResponse = request.GetResponse() Dim httpResponse As HttpWebResponse = CType(response, HttpWebResponse) ResponseCode = httpResponse.StatusCode Dim responseStream As IO.Stream = response.GetResponseStream() Dim sr As New IO.StreamReader(responseStream) resultData = sr.ReadToEnd() End Using ]]> -195 240 120 30 text -195 15 120 30 text -30 -75 180 60 105 -45 60 30 5edf7488-2c1a-4d9b-acc3-5ad2c079f0fe 210 -45 60 30 15 -105 60 30 a7992b7c-0659-49b6-ae90-99e7c890979a -195 -15 120 30 text -195 135 120 30 password -195 105 120 30 text -195 75 120 30 text -195 45 120 30 flag False -195 270 120 30 number -195 165 120 30 text Basic -270 -45 150 240 -270 210 150 90

YogitaKulkarni
Level 3
Does this require any extra DLLs or Namespaces?