web services: vendor security; hidden for each service call
Configuration settings of a Web Service Task addresses most of the client-service implementations. However in specific scenarios where you need more control over the service invocation it is better to use a script component with either all configuration settings as in-line code or added to the DTs config file. Have you tried achieving the above via a script component?http://btsbee.wordpress.com/
August 11th, 2012 4:49am

I would like to make you aware that you may want to implement calling the WCF from a Script Task. Reasoning is, you already have the WCF stub as C# code, which is easily portable to the SSIS 2008 Script Task. I found a video demoing that: http://www.youtube.com/watch?v=7s7w9pDF9Uo And like I said, you can pass the credentials from outside, using configurations.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 9:45am

DotNetMonster-- Thanks for your answer. If this were any other vendor, I'd ask -- because I think from a professional standpoint, it would be an overall better approach to get the web tasks to work within SSIS if possible, however grim reality always takes the upper hand!:-) For anyone else following my footsteps on this thread, I think exposing the metadata to re-proxy is worth trying. One detail to clarify though for the thread's sake: Once a person updates the proxy with the newly exposed meta data, what happens on the other side? Let's say the remote vendor/provider forgets why the meta data was enabled and then disables the service one Friday afternoon @5? Is the now out-of-synch proxy still usable, or will it throw errors-- or does it keep working, because the meta data is still essentially the same on both sides, just not exposed?
August 11th, 2012 9:57am

yes the service will keep working as you have the proxy generated. Under the cover Proxy is a contract between service and client about how the data would be sent and received. After all the whole communication is done using the XML formed data. When you send a request the Proxy C# code generated by .NET actually builds up an XML just the way the service required at the time of proxy using WSDL. On, the service side, the service would receive all the requests read XML out of it and try to map the xml data onto the code it has implemented. If the XML has the desired information then in the service will use the information to process the request and send back the response. A simple example to under stand is: lets say a service had a function call GoSSIS(int x, in y) which we proxied and later the service stopped the meta data service. Now the client would still be able to work as it has the .NET proxy classes which build the XML just the way the service wants. We have to remember the proxy files are not served by the service, instead .NET creates these service to help us to build a web request easily. We can still write up an XML our self and post it to the web service directly to make a simple web service work. Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 10:54am

Techies-- I am converting a wcf client to an ssis package. In order for any of the methods to be called at the remote vendor's site, security information is embedded (see source). In my old wcf client stub, I solve this when I create a new instanc of the service call by dubbing the client credentials into the session. The WSDL only shows the startdatetime, enddatetime -- but really needs the credentials too. I tried to set this up under the connection, but that didn't work. Has anyone solved for this in their travels? var api = new RemoteVendorService.RemoteVendorServiceClient(); // prepare/assign return order list with an object pointer List<OrdersByStatus> allorders = new List<OrdersByStatus>(); // prepare/assign channel list container for orders List<OrdersByStatus> ordersubset = new List<OrdersByStatus>(); var allOrderNumbers = new List<string>(); //contains all possible orders, irrespective of status try { api.ClientCredentials.UserName.UserName = username; api.ClientCredentials.UserName.Password = password; Array allstatus = RemoteVendorService.OrderStatusEnum.GetValues(typeof(OrderStatusEnum)); foreach (OrderStatusEnum status in allstatus) { allOrderNumbers.AddRange(api.OrdersGetByStatus(status, startdatetime, enddatetime)); }
August 11th, 2012 4:23pm

This looks to me just a part of Script Component, but your wording "I am converting a wcf client to an ssis package" makes me think I do not have enough info on what is going on. So how about you store your credentials in a config file or better table and use in the package in form of a variable, then this script? See http://msdn.microsoft.com/en-us/library/cc895212.aspxArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 4:57pm

Hi ArthurZ, Thanks for responding -- the C# code you see is from an old wcf client to the vendor's service. This line: var api = new RemoteVendorService.RemoteVendorServiceClient(); invokes a new instance of the all the methods available in the vendor's service. These lines stored the needed hidden credentials api.ClientCredentials.UserName.UserName = username; api.ClientCredentials.UserName.Password = password; This is the method in the vendor's service I want to call using a web service task in SSIS instead api.OrdersGetByStatus(status, startdatetime, enddatetime) In the old C# routine, the var api instance allowed me to include the credentials -- I don't see where under the web service task I can do something equivalent.
August 11th, 2012 5:07pm

So here is what I get: You have a old/legacy application that uses a WCF service. The proxy for that Service was generated way back at that time and the code is functioning quite well. What you have shared above is part of the code that actually works on the old application. Now you are trying to use the same service on your SSIS package but since WSDL is not available, you cannot generate a proxy. To your answer: You would have to ask the service provider to enable meta data service (which is usually turned off for security purposes). Enabling meta data is not a difficult thing to do its just adding/changing some settings to web.config of WCF. here is an example for it: http://stackoverflow.com/questions/1546716/where-to-enable-metadata-is-enabled-in-config Once meta data service is enabled you can re-proxy your service in SSIS and use it. Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 7:42pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics