The Scribe Adapter for Web Services is the Swiss army knife of adapters. You can pull it out of your bag of tricks to build sophisticated integrations to a wide array of applications and data sources. It does have a significant limitation – The Web Services Adapter can call out to SOAP-based web service providers. It cannot, however, act as a web service provider itself.
What the heck does this mean? Scribe Insight, through the Web Services Adapter, can initiate a request to a web service to query data or update data, but Scribe Insight does not operate as a web service provider. Other consumers of web services cannot initiate a web service interaction with Scribe Insight. Fortunately, this limitation is easily overcome using a simple easily-deployed custom web service.
Consider the following scenario faced by a Scribe partner – that partner wanted to build an event-based integration to send information from SAP/R3 to Microsoft Dynamics CRM. The partner could have built an integration process that executed a DTS with a source connection to a Web Service to poll the SAP application every couple of minutes, but the customer wanted the integration to be event-based – that is, as soon as records changed within SAP/R3, the integration should send that new or updated record over to Dynamics CRM in real-time or near real-time.
If you have a need to accomplish such a task, you can deploy a custom web service such as the following:
public class SampleQueueService : IQueueService
private const string ScribeInQueue = @"<your env>\private$\scribein";
/// Sends a label and XML formated string to a Queue
/// <param name="label">Mesage Label</param>
/// <param name="xmlData">Message Body</param>
public bool SendToQueue(string label, string xmlData)
bool success = false;
MessageQueue scribeInQueue = null;
scribeInQueue = new MessageQueue(ScribeInQueue);
success = true;
success = false;
if (scribeInQueue != null)
For a more easily-read format to see this sample code, view the code gist.
This custom web service simply receives an XML message and in turn publishes that message onto the Scribe InQueue MSMQ queue. This web service can be easily deployed to an IIS web server.
Through this technique, you could write an integration such as shown below:
This diagram depicts the following steps:
- The SAP NetWeaver Process Integration (SAP PI), formerly called AP Exchange Infrastructure (SAP XI), detects changes as they occur in SAP, formats those change events as XML messages in a format expected by Scribe Insight, and posts those messages to the custom-built web service as shown above.
- The custom web service receives the XML message and deploys it to an MSMQ queue.
- A Scribe Insight Integration Process, configured to pull messages from a queue-based source, reads the incoming XML, performs any manipulation or transformation required, and updates Dynamics CRM via the Scribe Adapter for Dynamics CRM.
As you can see from the above code sample, the logic is fairly straight forward for a .NET programmer to customer the sample web service to tailor it to suit your needs.