Changes to WSDL structures in SSIS

I haven’t managed to find a clever way to associate my SSIS tasks with a WSDL integration – in this case salesforce – as of yet, so heres some notes on how I have to update each time I need to change the structure…

The SSIS script task that i run utilises the sample login routines to create access to the service, and then I have generated a class library from the WSDL file I obtained from my enterprise subscription with salesforce.

Once logged in, I need to pull extracts of various objects in full, so I create a SQL query that I pass through the querySample (sample code I found)… using the SforceService.query method. I get the SQL for the object from using the Apex Data Loader desktop client, which allows you to cut and paste directly out.

The result is then consumed (in this case) into a CSV which is managed into a SQL server database after some transformations later.

The issue is obviously i have created the .CS through wsdl.exe and its a point in time reference. As time goes on I need to add in new fields and when you just update the SQL, if the variables aren’t described in the wsdl file it crashes. So obviously you still need to update the SQL reference in the code, but I also then have to recreate the .CS file – for some reason I’m unable to generate a fresh one and reference it… i’m sure this can be fixed, but in the meantime i create a new one, and copy and paste the content over the existing… a build succeeds and the new object structure is recognised.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s