views:

72

answers:

2

I'm working on designing an EDI system for two companies: Company A and Company B. Company A already exists as a small manufacturing business, and Company B is a new company formed around a specific product with the involvement of the owner of Company A. Company A will have exclusive rights to produce the product for Company B.

I'm responsible for all things IT and development with both of these companies. I need to design an EDI system for communicating orders and other information from Company B to Company A, and vice-versa (for confirmations and status updates, etc).

This type of stuff is fairly new to me, so I'm just looking for advice on how to send a new order from Company B to Company A and guarantee that it gets there, is stored, and doesn't get sent more than once.

I'm thinking I'll probably do this with web services. Should I look into WCF services or stick with ASP.Net web services?

I assume I'll send a unique ID with each order so Company A's system will recognize not to save it twice if there is a mix up, but how do i know for sure that company A got the information?

Any other tips or advice is more than welcome.

+2  A: 

See Microsoft: ASMX Web Services are a “Legacy Technology” to learn why not to stick with ASMX web services.

Don't the orders already have some unique identification?

At any rate, the service at Company A will want to ensure the order is securely recorded (perhaps in a database), and only then will the "Send an Order" operation complete.


At Company A, I'd create an order processing service. So far, it would only need one method: AcceptOrder. This would accept all of the information necessary to process an order. This operation would first save the order into a database, and once the data are safely stored, would return some sort of confirmation code.

An attempt to send the same order again would fail, because you'll keep a unique key over the unique order identifier from Company B.

We're going to trust our database, so that once we know the data have been committed, it's safe to respond "we've got it!"

Other technologies could also be used. A transactional queue, for instance, using MSMQ. It would have the same benefit that, once it says it has the data, you can trust that it has the data.

John Saunders
I get that, but how do I tell it it's complete? Do I just return a confirmation code so it knows it's stored and call it a day?
Max Schmeling
I just don't want there to be any possibility of Company B trying to send the order, thinking it got sent and stored, but Company A not actually getting a record of it.
Max Schmeling
I would return a confirmation code of some sort when the method returns. But I wouldn't return until the row is committed to the database.
John Saunders
okay, i guess i was just trying to make it too difficult... there's really no reason to do anything more difficult than that though... thanks
Max Schmeling
Microsoft's declaration of ASMX Web Services as "Legacy Technology" is self-serving at best. They've finished doing the embrace / extend routine on Web Services and renamed it WCF. Now they want you to buy the newest Visual Studio and write code that isn't compatible with anything written later than a year ago.
quillbreaker
@quillbreaker: you can't be serious, or else you haven't noticed the differences between ASMX and WCF. And this isn't new. The writing has been on the wall since WCF was introduced as an obvious replacement to ASMX, WSE and .NET Remoting. And don't forget ASMX has been with us since .NET 1.0. That's fairly "legacy" as "legacy" goes.
John Saunders
More importantly, no matter who Microsoft may serve, we don't serve ourselves very well by ignoring the fact that they won't be fixing bugs in ASMX or the XML Serializer.
John Saunders
+1  A: 

Send a unique ID with the web service call and have the web service return an unique confirmation code and order status. That should pretty much cover you. If you want you could add an query order status method in the web services to allow you to see whether an order has been previously sent.

Jeffrey Hines