cancel
Showing results for 
Search instead for 
Did you mean: 

Error when making HTTP Post call using Utility VBO

yusuf.hoosain
Level 2
Hi

I am trying to make a SOAP service call to a service which requires certificate for authentication. I am able to make a call using POSTMAN which has the cert and key file loaded on POSTMAN. If I only load the cert without the key file I am unable to make the call.

I have imported the cert using the Utility VBO which returns a cert id.
Using this as an input along with the POSTMAN code stage I have copied all details of the request.
I have made a collection with one row for the headers as per postman:
--header 'Content-Type: text/plain' \




When I make the call using the Utility HTTP I receive the error :

Internal : Could not execute code stage because exception thrown by code stage: Cannot set null or blank methods on request.
Parameter name: value

If I change the method to POST I receive the error below:
Internal : Could not execute code stage because exception thrown by code stage: Object reference not set to an instance of an object.

I have attached the inputs of the request.
31839.jpg
Kindly advise how make this call using the Utility HTTP VBO. 
I tried using the WS Wizard but I am unable to locate the certificate when setting up, error :
No Certificate found matching that criteria. 

31840.jpg

Kindly advise on the steps required to call this service using Blue Prism.

Regards

Yusuf

------------------------------
Yusuf Hoosain
RPA Developer
Africa/Johannesburg
------------------------------​
28 REPLIES 28

ewilson
Staff
Staff
@yusuf.hoosain,

Couple of things I see:
  1. The value of Method should only be the specific HTTP verb you're trying to use (ex. "GET" or "POST").
  2. There's no need to include Content-Type in the Headers collection because you're already setting the Content Type attribute.

Cheers,​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

ewilson
Staff
Staff
@yusuf.hoosain,

What's the value of [Certificate ID Forum]?​ I assume you called the action Load Certificate before trying to call the HTTP Request action?

Cheers,
​​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

EVIPUTI
MVP
Two things which i noticed :

1- The method is wrongly defined . It only takes "POST,GET , PUT.. no need of giving curl there.
2- Looks like you are not loading certificate here first .

------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------

Hi @Vipul Tiwari, @ewilson

I am also dealing with the similar problem as Yusuf. I am able to make a call using POSTMAN with cert and key file loaded and I am trying to replicate the same approach by using HTTP Request VBO, but I'm getting this error:

31491.png
The process sequence is following:

31492.pngHeader contains the information about Client-Id and Client-Secret, necessary for authentication. Details of HTTP request are following:

31493.png
Would you please be so kind and could you advise how to solve this issue?

Many thanks in advance.
​​​​

------------------------------
Marek Mroc
------------------------------

Hi @Marek Mroc

I think the problem is with the combination of the "Content/type" and the "Method". 

First to all, the correct way to type the content type is: application/json (Take care with the correct slash that you use)

And, when you put a content type is to send information, not to receive. You can avoid this parameter cause you are using the "GET" method.

Can you try with this changes and let use know if this solves the problem?



See you in the community, bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

Hi Pablo,

thank you for your response. I tried to adjust the settings according to the call from Postman so I added content type there as well, despite I'm trying to get the data not post. Nevertheless I deleted the application/json from inputs but I'm still getting the same error.

31501.png
Could the problem be with the header which is a collection I am populating before the request?

31502.png31503.png

------------------------------
Marek Mroc
------------------------------

Hi @Marek Mroc

Ooops.... 😞

Never mind, let's continue checking!

Remove the "accept" value. If I'm not wrong, these "AcceptType" does not exists. (This is the list of types that you can use: text/html, text/xml, image/gif, image/jpg, application/msword)

Can you check if the action "Load Certificate" populate the Dictionary of certificates? 

​About the headers, I check at one of my calls to this action, and looks correct. You must to create a collection with only one row with as many columns as headers you want to add. 


Hope this helps you!

Bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

@Marek Mroc,

So the service you're trying to invoke requires a client certificate in addition to a client ID and client secret in the headers?

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hello Pablo,

unfortunately it is still not working and I am getting the same error.
31525.pngCertificate seems to be loaded successfully.

------------------------------
Marek Mroc
------------------------------