FuelSDK-CSharp icon indicating copy to clipboard operation
FuelSDK-CSharp copied to clipboard

SoapClient.Retrieve() unable to deserialize Activity object.

Open barokzi opened this issue 4 years ago • 3 comments

Describe the bug SoapClient.Retrieve() unable to deserialize Activity object.

To Reproduce

{
:
RetrieveRequest rr = new RetrieveRequest();
            rr.ClientIDs = new[] { _ClientId }; // instantiated outside block, ClientId1 assigned.
            rr.ObjectType = "Activity";
            rr.Properties = new[] {
                "ObjectID",
                 "Definition.ObjectID",
                "Sequence",
                "Name",
                "CustomerKey",
                "IsActive",
                "CreatedDate",
                "ModifiedDate" };
            rr.Filter = filter;
           
            string resp = SoapClient.Retrieve(rr, out string requestID, out APIObject[] results);
            // i get an exception at this point.

:
}

Expected behavior results parameter would contain deserialized Activity objects. The same snippet above (with appropriate "Properties" settings) work for retrieving Automation objects.

Screenshots image

Note: I did have to instantiate a new SoapClient object so I can use my UserName/Password: ``` public SoapClient OpenSoapClient(string username, string password) { // Create the SOAP binding for call. BasicHttpBinding binding = new BasicHttpBinding(); binding.Name = "UserNameSoapBinding"; binding.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential; binding.MaxReceivedMessageSize = 2147483647; var soap = new SoapClient(binding, ETClient.SoapClient.Endpoint.Address); soap.ClientCredentials.UserName.UserName = username.IfNullOrWhiteSpace(""); soap.ClientCredentials.UserName.Password = password.IfNullOrWhiteSpace(""); return soap; }

barokzi avatar Jun 10 '20 23:06 barokzi

Is there any updates on this ?

I am getting "Security requirements are not satisfied because the security header is not present in the incoming message." when trying to execute a SoapClient.Retrieve , is the header token not working ?

imartinflores avatar Aug 25 '20 10:08 imartinflores

So what I am trying to do in my original post is to get the (at least the SQL) activities for a particular automation. My intent was to get the automation activity(s) for the automation, and based on the documentation automationactivity object includes activity object definition (key or id).

Anyone?

rodelpontanares avatar Nov 24 '20 06:11 rodelpontanares

@imartinflores. Unfortunately, the deserialization issue is still unsolved. However in your case, you need to add the authorized token header prior to calling SoapClient.Retrieve(), which is actually easier than what i did to circumvent the header issue.

barokzi avatar Jan 28 '21 00:01 barokzi