Building a web service for consumption - receiving "batch" data from 3rd party
Building a web service for consumption - receiving "batch" data from 3rd partyOld forum URL: forums.lhotka.net/forums/t/6121.aspx
jscontreras posted on Sunday, January 11, 2009Hi,
I'm currently designing a web service for our 3rd party providers. They want to be able to pass some type of object containing data about customers into our CRM system.
3rd Passes new data (via webservice) -> webservice receives data object -> webservices calls the Facade which passes the data object to a Business Object -> the Business Object calls the DAO to insert the new data
The data object being passed in the web service is a container for customer information
Can have one or more records.
1. I want to use the CLSA Framework to accomplish, can I use the CLSA to accomplish this design
2. I've use Web Services but only internally - I'm a novice using web services externally how can do I this, any samples would be great
SonOfPirate replied on Sunday, January 11, 2009
Absolutely. Your CSLA business objects will sit behind the service interface. Take a look at the Web Service Interface chapter in the book and the ProjectTracker sample app for example code.
In its simplest form, you'd have a CustomerList that contains Customer business objects. Your service would "translate" the CustomerInfo data transfer objects (DTO) passed into the service method to Customer objects and populate the CustomerList then call the Save method on the list class. It really is that simple.
Hope that helps.
jscontreras replied on Saturday, January 17, 2009I've design a customer object and reviewed the Sample Web Service in Project Tracker. In the Add Project Web Method it only adds one project at a time. What I'm trying to figure out is if my client sends a bundle of customer information how can I handle that specifically?
Would it be something below. I'm not sure how to handle via a webservice.
public ArrayList LoadUsers()
User user = new User();
jscontreras replied on Sunday, January 18, 2009Ignore Previous Post it was sent by accident. I would like to do something like below
public IList<Customer> LoadCustomers(IList CustomerList)
CustomerFacade facade = new CustomerFacade();
LoadCustomers would expose the BO --> DTO behnind the scenes. Is this possible within the Framework.
Copyright (c) Marimer LLC