robert-pulldigital
-
6/21/2013 10:30:48 AM
RE:Integration Bus
The code is changing dramatically but right now it's this
The service itself that is listening for requests
[WebMethod] public void ProcessProduct(object data, TaskTypeEnum tasktype) { if (data != null) { IntegrationHelper.ProcessExternalTask("SalesforceProductIntegrator", data, IntegrationProcessTypeEnum.SkipOnError, tasktype, TaskDataTypeEnum.Simple, "EcommerceSite"); } }
The web service simply calls the method ProcessExternalTask which is in the framework and makes a call to ProcessInternalObject which has been overridden in our customer integrator and looks like
public override ICMSObject PrepareInternalObject(object obj, TaskTypeEnum taskType, TaskDataTypeEnum dataType, string siteName) { BaseInfo info; info = CMSObjectHelper.GetObject("cms.eventattendee"); try { XmlDocument doc = new XmlDocument(); doc.LoadXml(obj.ToString());
info.SetValue("name", doc.SelectSingleNode("/Value1").InnerText);
} catch (Exception ex) { EventLogProvider logProvider = new EventLogProvider(); logProvider.LogEvent("E", DateTime.Now, "PrepareInternalObject", ex.GetBaseException().ToString()); }
return info != null ? info : null; }
That is the latest inception where you see the info object we have previously been using a SKUInfo object but I believe I must use a baseinfo object. Unfortunately I don't yet know the type I need for an ecommerce object so I went with eventattendee from an example I was looking at.
There is still no error and nothing pops up in the queue but I can debug it and step through so i'm happy it's close to working :)
Thanks
|