I need to make a api call from my workflow(Method type is POST), I am using HttpSend control from Microsoft.Activities to do this. I am able to call my api but not able to send parameters from workflow to api. I tried passing a simple string type parameter through RequestContent in HttpSend but still not able to retrieve its value in my api call.
Screen Shots
Can you provide me a simple example or a link to explain how can i pass parameters from workflow to api for POST
USe the RequestContent parameter of Call HTTP Web Service action for setting payloads to submit to the service.
See this similar example from SHarePoint
https://blog.vgrem.com/2014/05/08/consuming-the-sharepoint-2013-rest-service-from-sharepoint-designer/
Related
we need to do a communication between Podio and a WebService, and we suppose that the solution is to use hooks.
We have a WebService with one function "createInvoice" with some parameters, and we need to invoke this when we create an item on Podio.
We have read the Podio documentantion but we don't find the manner to do this.
http://podio.github.io/podio-dotnet/webhooks/
As the above link suggests, is it necessary to use a ".ashx" class (Handler) to receive the item from Podio and send the correct information to the WebService or exists another solution?
Thanks!
Its not necessary to be an ashx file.
You just need to have a public URL that expects POST parameters from Podio.
As given in the example code, you need to check the "type" parameter and verify the webhook to enable it.
I am using Crossbars dynamic authorization to authorize all RPCs in my application.
Is it or will it be possible to access the arguments of the RPC in the authorizer?
It might be possible to solve the issue by utilizing "pattern based registrations". The argument can then be moved into the URI to be examined by the authorizer.
For example the protected resource can register com.example.user.*.delete and when the procedure is called with com.example.user.123.delete - the authorizer will be able to extract the user ID from the URI.
This is documented in the WAMP spec and also in the documentation for Crossbar.io
Accessing the arguments of the RPC is not possible. Dynamic authorization is there to work on the level of the data contained in the configuration, not application payload. If you want to do authorization based on the payload, then this needs to be triggered from the side of the callee.
I invoked a REST API function and got back the response:
{"errorOccurred":"true","exceptionType":"com.yodlee.core.IllegalArgumentValueException","referenceCode":"XXXXXXXXXXXXX","message":"Multiple exceptions encapsulated within: invoke getWrappedExceptions for details"}
I don’t see anything in the Yodlee documentation describing how to “invoke getWrappedExceptions.”
How do I determine what’s wrong with the REST request I sent that received this response?
IllegalArgumentValueException comes when the parameter for the corresponding REST API is not passed correctly. Please go through the API reference section for the particular API and validate all the parameters you are passing.
If you are using either of the addSiteAccount1 or addItemForContentService1 and getting this exception, then please call either getSiteLoginForm or getLoginFormForContentService and use the correct value form these calls to form the request for addSiteAccount1 or addItemForContentService1.
I am consuming one java webservice with WCF client.
I want to pass user related information to service in header. I have aleady gone to through thread
How to add a custom header to every WCF calls?
I have implemented IClientMessageInspector interface with BeforeSendRequest() method. Now, I want to pass user related information in SOAP header like Oraganization, which may differ for every user. I have all this information in my ASP.net application, which uses this service.
Is there anyway I can pass user related information to this BeforeSendRequest() method from asp.net session and build Message header before sending any request?
There are few options
Put the information in Session and retrieve it in BeforeSendRequest
Put it in HttpContext.Current.Items and retrieve it in `BeforeSendRequest'
Use Thread Local Storage (http://msdn.microsoft.com/en-us/library/6sby1byh.aspx)
I am running Restful web service on 8182 port using restlet framework. I am trying to authenticate user to hit the service. i.g.
I have a query string like this http://localhost:8182/api/service/customers/?key="XXXXXXXXX"
My doubts are:
How to get value of parameter key in Resource class/Application class, so i can authenticate user upon key through my custom database.
I don't have any client code for my restful service, since i want to invoke all call from browser itself. so please tell me,how to send post data from browser itself. since i want to use post/put method to add new customer data.
I am using restlet framework 1.1.
Thanks in advance.
Karunjay Anand
You can use:
getRequest().getResourceRef().getQueryAsForm()
This will return a Form instance from which you can get the value of your query parameters (getFirstValue("key"), for example).
As Bruno pointed out, you can obtain a Form instance to access the request's query parameters:
Form form = getRequest().getResourceRef().getQueryAsForm();
for (Parameter p : form) {
System.out.println("Name: " + p.getName());
System.out.println("Value: " + p.getValue());
}
If you want to use the POST method from the browser itself, I would recommend you use one of the following add-on/extensions:
Firefox - REST Client
Google Chrome - Simple REST Client