Reputation: 15
I am trying to configure a WCF service with the OracleDBBinding to get data from the Oracle db every x minutes. This polling is automated thanks to the binding configuration. This WCF service will run on a remote server.
The problem is how do I get the data that the remote WCF service obtains back to BizTalk?
Is there a particular configuration in the WCF service to enable this?
Do I just create a WCF-basicHTTP receive location in BizTalk and point the URL to the remote WCF service?
Upvotes: 1
Views: 211
Reputation: 21641
It would be optimal to just have BizTalk poll the Oracle DB directly, as others have mentioned. I'd push back on your infrastructure team to find a way to make that happen. However, if you truly can't get it, you could set up your remote WCF service to call out to a listener end point on the BizTalk machine. To minimize latency/communication overhead, you could use a NetTCP receive location on the BizTalk side. Set this up in the standard way from BizTalk, using the WCF Service Wizard to create an IIS application etc. - see https://msdn.microsoft.com/en-us/library/bb728041.aspx). Your intermediate service would be a client of this service. The sequence would be something like:
Note that this will not end up using MSDTC for the whole transaction - if your intermediate service throws an exception, BizTalk will have no awareness/insight to that, nor will any BizTalk monitoring tools you might be using. (That's part of why it'd be best to just have BizTalk poll directly.)
As far as BizTalk is concerned, this data isn't coming from Oracle, it's coming from the intermediate WCF service. You could, of course, use a schema that looks like how the Oracle adapter would write the XML - but that wouldn't be required.
This is assuming your remote service is already doing the polling on its own (using a System.Threading.Timer
or something of the like) against Oracle, and you're all set with that. If you need BizTalk to fire the polling event, there's nothing out of the box that can handle that. You could try using the Scheduled Task adapter (maybe do an HTTP POST to that service?), but that seems like it'd be even more complicated and error prone to me. You could also set up a SQL polling adapter that just always returns true (e.g. having a pollingdata available statement like SELECT 1
) and publishes a message that another port listens to and forwards to this service - but again, that's very messy/hacky and wouldn't be a good idea.
Upvotes: 0
Reputation: 11040
If you are retrieving data from Oracle for use in a BizTalk app, then you should have BizTalk Poll the data directly. Meaning, you cannot use a 'remote' WCF Service.
The oracleDbBinding supports Polling for this exact purpose.
Upvotes: 0
Reputation: 555
Does the remote WCF service exists with the sole purpose of polling the Oracle db and pushing to BizTalk?
I would let BizTalk poll the Oracle db directly (receive location with OracleDBBinding) and then send the data to the remote WCF service, if needed.
Upvotes: 2