You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
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
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;
}
The text was updated successfully, but these errors were encountered:
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 ?
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).
@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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
SoapClient.Retrieve() unable to deserialize Activity object.
To Reproduce
Expected behavior
results parameter would contain deserialized Activity objects.
The same snippet above (with appropriate "Properties" settings) work for retrieving Automation objects.
Screenshots
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;
}
The text was updated successfully, but these errors were encountered: