Outbound Call will simply POST an XML string to the URL you specified. If you get timeout errors, This usually means Clarizen is not able to access your service. You need to make sure your url is accessible from outside your network and can accept HTTP POST.
Outbound calls - any examples?
I am trying to prepare a custom action that uses an outbound call to my webservice. I have set up a simple webserver to dump the contents of the request but I keep getting timeout messages from Clarizen. The service definitely works because I can access it from different outside machines.
Did anyone have similar problems or has any ideas? Or does anyone have any specification of how Clarizen calls webservices?
Please sign in to leave a comment.
Thanks! It seems that Clarizen cannot connect on a port other than 80. Reconfiguring the server to run on 80 and dropping the port declaration in the url solved the timeout issue.
Is there xsd for outbound calls somewhere available? The schemas for Clarizen API: https://api.clarizen.com/v1.0/Clarizen.svc don't include definition for OutboundRequest element.
I am also having trouble with the spec for the outbound call due to lack of examples. firstname.lastname@example.org would you be able to share what problems you are having and how you structured your web service? I do need to run over https.
I would also like to the the structure of the webservice you used to accept the Clarizen XML string. Please can you post sample code?
Here's a sample. It is an excerpt from a .NET MVC controller action, but I believe it's easy enough to figure.
Note that the session ID appears only if '_send also Session ID of this user' _was specified in the Outbound Call customization settings. The session Id can be used directly with the Clarizen API without having to explicitly login.
XmlDocument doc = new XmlDocument();
XmlElement outboundRequest = doc.DocumentElement;
Trace.WriteLine("Org Id: " + outboundRequest["OrganizationId"].InnerText);
Trace.WriteLine("Rule Name: " + outboundRequest["RuleName"].InnerText);
Trace.WriteLine("Session Id:" + outboundRequest["SessionId"].InnerText);
foreach (XmlNode entityNode in outboundRequest["Entities"].ChildNodes)
Trace.WriteLine("Id = " + entityNode["Id"]["TypeName"].InnerText + " " + entityNode["Id"]["Value"].InnerText);
foreach (XmlNode valueNode in entityNode["Values"].ChildNodes)
Trace.WriteLine("field name: " + valueNode["FieldName"].InnerText);
Trace.WriteLine("value: " + valueNode["Value"].InnerText);
Thanks Ophir :-)
Do you have any examples using Linq?
Not really. Sorry.
But I believe the structure of the XML is simple enough to handle. It's quite similar to the way the API works.
Also, you control exactly which fields are sent in the settings of the Outbound Call.