Note that there are some explanatory texts on larger screens.

plurals
  1. POWeb Service in SSIS
    primarykey
    data
    text
    <p>I am trying to use a web service as part of a dataflow task in SSIS. Right now i have a script task within a data flow with a web service reference.</p> <p>What the task has to ultimately do is: collect all postal codes from an inernal database > use the web service i created to get the lay/long of thos postal codes > export the lat/long to a table.</p> <p>As i said before i have the scrip set up and looks to be working, but when i go to execute the package i get an <code>CannotCreateUserComponentException</code> error.</p> <p>Any help on this would be awesome, or another approach to it? I am new to the web services in SSIS so this is the best solution i could come up with.</p> <p>Edit:</p> <p>Right now the script is accepting the postal code from an <code>OLE DB Source</code> and will ouput a string in for format of "lat,long" (presumably). The web Service was created by someone within the company and has one method called <code>FindCoordinates</code> which takes in a string value (Postal code)(which i think calls the google geocode xml, not exactly sure what he did). Here is the code that is currently in my script:</p> <pre><code>using System; using System.Data; using Microsoft.SqlServer.Dts.Pipeline.Wrapper; using Microsoft.SqlServer.Dts.Runtime.Wrapper; using SC_6c1b642acd544cd5b01c032b6f8dfd03.csproj.MyService; using System.Xml; using System.Web.Services; [WebService(Namespace = "http://microsoft.com/webservices/")] [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute] public class ScriptMain : UserComponent { public override void PreExecute() { base.PreExecute(); /* Add your code here for preprocessing or remove if not needed */ } public override void PostExecute() { base.PostExecute(); /* Add your code here for postprocessing or remove if not needed You can set read/write variables here, for example: Variables.MyIntVar = 100 */ } public override void Input0_ProcessInputRow(Input0Buffer Row) { String postal = Row.PostalCode; Service service = new Service(); Row.LatLong = service.FindCoordinates(postal); } } </code></pre> <p>Hope this help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload