Sunday, March 11, 2012

Calling a custom web service from my package to perform heavy-duty tasks

As part of my SSIS package, a list of sites is created that need to be created on a remote machine. let's say 1000 sites. I need to pass this list to a web service so web service sitting on that machine creates these sites for me. MY SSIS package does not run frequently so I can sacrifice time a little bit to get better functionality.

I need to move the sites that are not created (for any reasons) by web service to another table and successfully created sites to another table, so I need to get confirmation for each site from the web service.

Which option is better?

1) Calling web service for every single record (site) and get the confirmation and then based on the confirmation I move the records accordingly. I know this might be very time consuming, but as I said my SSIS package might only run every six months

OR

2) Sending records to a web service in a batch and get the result. I don’t know how to do this though.

Any help or better solution is appreciated.

If the web service is already created, you might be stuck with whatever it supports. Often, web services have either a single record interface or a batch interface, but not both. If you have control over how it is implemented, then either option will work.

If the web sevice is capable of handling a batch, you just need to make sure your message conforms to what the web service expects. That could be by concatenating a large string together.

|||

Web Service is not implemented yet.Actually I have to implement the web service.Any clues on how to implement batch web services?

Thanks

|||

The message that the web service accepts needs to contain multiple items, and handle processing them in a batch.

For example, your message payload might contain:

<Websites>
<Website>A</Website>
<Website>B</Website>
<Website>C</Website>
</Websites>

No comments:

Post a Comment