What request properties are available to retrieve under the Activity object type in marketing cloud SOAP API - api

So I am using postman to retrieve all the activities information under one automation. But I have trouble retrieving the activity types.
The response I got was:
<soap:Body><RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"><OverallStatus>Error: The Request Property(s) AutomationTask do not match with the fields of Activity retrieve</OverallStatus><RequestID>----</RequestID></RetrieveResponseMsg></soap:Body>
Hence, I am curious if there is a list of request properties that I can use (like a documentation for the activity object type properties) in the soap api call.
I have tried https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/automationactivity.html but not much luck, some of the fields are unable to retrieve.

Related

Validating API response body with DB data

My requirement is I am dealing with complex API's where data keeps on changing. So I want to know how to validate API response body with Database data using Java + TestNG framework
I don't know any method

Identify Operation on the basis of xml content posted in WCF Service without including operation name in Url

How to identify operation from xml content posted to WCF Service Url?
Suppose WCF Service Url is http://single.mat.nn.com and client dont want to include operation name in Url.
Problem is to identify operation on the basis of xml content posted .
I am not able to find any solution for this problem. Is it feasible to do configuration in WCF Service that can identify operation method on the basis of xml content posted to WCF Service URL.
One of the scenarios possible in Extending Dispatchers is:
Custom Operation Dispatching. Users can implement dispatching on something other than action – for example, on the body element, or on a custom message property. This can be done using the IDispatchOperationSelector interface.
Implmenting IDispatchOperationSelector will give you access to the incoming message to parse and decide which method you want to forward the request to.
The SOAP web service based on the corresponding method of the SOAPAction field request in the HTTP request. See the screenshot below.
The SOAPAction field and the method section in the request body can view the operation name of the specific request. If you want to recognize this value, we can intercept the SOAP message through the following two interfaces and get the value of the field.
https://learn.microsoft.com/en-us/dotnet/framework/wcf/extending/how-to-inspect-or-modify-messages-on-the-client
https://learn.microsoft.com/en-us/dotnet/api/system.servicemodel.dispatcher.idispatchmessageinspector?view=netframework-4.8
these two interfaces could capture the SOAP message during the communication. We could retrieve the field value and modify it.
Feel free to let me know if there is anything I can help with.

Yodlee Aggregation REST API error message

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.

RESTful API design: inner interaction

Simple question. I read a bunch of articles about API design and didn't find the answer.
How should API's endpoints interact with each other?
For example, if I have 2 endpoints: /category/:name and /messages. What is the best way for example to check category existence from messages?
1) Database query from /messages handler like: SELECT * FROM categories WHERE name = 'test'?
or
2) HTTP request from /messages handler to that endpoint like: httpclient.get('/category/test') ?
or
3) Client should get all categories, get ID of particular category and send request to /messages with that category ID?
The question is simple but not an answer. One thing is sure, never use (2) solution. Requesting some data using http client when you can invoke a method will decrease performance and capacity of your API.
If checking existence of a particular category is required to create response in /messages then use (1) but instead of invoking SQL query invoke the same method as used to handle request to /category/test just invoke it locally not through HTTP.
Solution (3) is the REST-way when each endpoint is responsible only for one type of resources. The disadvantage is that it may require more HTTP requests from client to API.
You should design your application in a way that all the endpoint are calling internal APIs for performing the task. When you want to invoke one operation inside other then you should use the respective internal API instead of any other approach like calling http service.

How add cutom header in WCF with dynamic user values to every call?

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)