I currently have a visual basic console application that runs on the server nightly and that has several classes. Each class has lots of properties as well as quite a few procedures and functions doing various tasks.
I have a payer class that handles information and functions dealing with payers, a recipient class that handles information and functions dealing with recipients and I have a payment class that holds information about payments. Two of the payment class properties are of payer type and recipient type. Part of my application creates a PDF out of all of this information and faxes it to the recipient.
Now I also have a asp.net website that displays information about all of these payers, recipients, and payments. Currently it does not access anything the console application has. It just gets information from the database and displays it in various list views and things.
The client is now asking to have a button on the website that would allow them to recreate the pdf that the console application currently generates. There is a lot of code involved in this and I need a way to not duplicate it.
My thought was to make a webservice that handles creating the pdf and both the application and the website could call it. But the web service will need access to these custom classes that currently live in my console application.
What would be the best way for both my webservice and the console application to have access to these classes. Would it then be possible to pass a custom object of type payment as a parameter to the webservice?