JAMS and Windows Communication Foundation (WCF)

JAMS Job Scheduler now utilizes Windows Communication Foundation (WCF) which makes it easier than ever to expose a web service in the context of an automated IT environment.

Pushing to and Pulling from Web Services

JAMS can help integrate web services via PowerShell or Workflow. A PowerShell job can use the New-WebServiceProxy cmdlet to create a proxy for any web service; then it can use that proxy to call the web service. Here’s a simple two line example:

$ws = New-WebServiceProxy -uri https://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl
$ws.GetCityWeatherByZip({zip}) | out-default

You can see that it is easy to use PowerShell to pull data or send data via a web service.

However, it can be somewhat challenging to expose a web service with only PowerShell. It can be done but, it wouldn’t be a simple two-liner. For exposing web services, you should look to Workflow.

Exposing Web Services

A JAMS job that uses the Workflow execution method can both consume web services AND expose web services. It does so by using two built-in activities:

1. Send, which calls a web service, and
2. Receive, which exposes a web service and waits for a client to call it.

JAMS makes web services more reliable and scalable, too. It’s easy to expose a web service through IIS but, problems can arise if the processing behind the web service is complex in any way. In many cases, it makes more sense to have the web service just submit a JAMS job to do the actual processing. Then you have granular control of the processing. You can throttle the number of concurrent executions, retry on failure, load balance, send a notification, etc.

JAMS will also work well with an Enterprise Service Bus (ESB). An ESB might handle the initial routing of a message and determine whether or not the message should be passed to a JAMS job for further processing. Our .NET Class library and the Submit class makes that easy.