Ayende @ Rahien

It's a girl

Rhino ETL: Web Services Source

Well, after some thinking, I figured out that I actually had only two types of sources, database and other. Since other is going to always be code, I decided to start with web services source, since that is arguably the easiest (nothing much to do there). It turned out to be more complicated than I assumed, mainly because the .Net 2.0 web service stack has no easy way to do duck typing of web services. It requires compiled web services. I got around that by doing runtime compilation, but still,that is hardly elegant.

Anyway, what I have now is this:

source WebServiceGenerator:
	execute:
		empSrv= WebService(WsdlUrl: "http://localhost:9090/GetEmployees.asmx?wsdl" )
		results = empSrv.GetEmployees("Northwind")
		for result in results:
			SendRow( Row(
				Id: result.Id,
				Name: result.Name
				))

As you can see, the only thing that I really need to do is to specify the WSDL url for the web services, and everything from there is fairly natural. The execute block is used to distinguish between database sources (which has command, parameter, etc) and the "other" sources, such as the one above.

Note: Due to the way Rhino ETL works, the order of the sent rows and the order of their processing may differ. This means that if the web service send you Emp #1, Emp #2, Emp #3, they may be processed in Emp #1, Emp #3, Emp #2. (Actually, the issue would tend to come up with larger amount of rows, since the problem is different processing of the batches.

Next step, supporting Web Service output, which may require some complexity if the web service expect complex types (and since I know that I need to handle those, I have to support that with dynamic compilation, that is going to make my life interesting :-)

After that, I intend to start integrating File Helpers as a source / destination for files. I will post separately on this, but so far I am impressed with both the ease of the API and the quality of the documentation.

Comments

Marcos Meli
08/06/2007 03:57 PM by
Marcos Meli

HI there

Thanks a lot for your comments about the FileHelpers library =)

I answer your mail, did you get the response ? I ask because I can be in the spam box :P

Cheers

Mike Thomas
08/10/2007 04:28 PM by
Mike Thomas

Have you thought about allowing .xls/.xlsx files as a data source?

Ayende Rahien
08/10/2007 04:41 PM by
Ayende Rahien

Yes, that is certainly a goal.

FileHelpers supports this in two ways, one using interop, which is not a good solution if you are running on a server, the other using OleDB.

I think that it would be easiest to handle this with OleDB.

Comments have been closed on this topic.