Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Call web method from script task

Author  Topic 

Juls
Yak Posting Veteran

51 Posts

Posted - 2012-06-19 : 15:13:39
Hello,
I can't seem to find anywhere straight forward examples on how to call (invoke) a web method from script task.

Here is what I have:
1. Created scrip task
2. Added web reference to my service. lets call it ABC_SERVICE
3. Added
using System.Xml;
using System.Web.Services;
using System.Web.Services.Description;
using System.Web.Services.Discovery;
4. Loaded my variables into script
var enrollId= dts.variables["abc"].value

var legacyId= dts.variables["def"].value
5.
NOW, how do I actually call to execute method of my service?
my method name is
UpdateMyId(Guid enrollId, int legacyId);


Thanks!!!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-06-19 : 15:39:17
see

http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/01/28/consuming-web-services-in-ssis-script-task.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Juls
Yak Posting Veteran

51 Posts

Posted - 2012-06-19 : 15:54:12
Thanks.

Here is a stupid question.. i never did this and i am not sure where or how to
"create a Proxy Class using WSDL from .NET command prompt"
Where exactly is .net comand prompt?

pardon my ignorance
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-06-19 : 18:37:38
you'll have command prompt present as an option if you've installed visual studio .net

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Juls
Yak Posting Veteran

51 Posts

Posted - 2012-06-20 : 10:37:20
Ok,
So I created the proxy class and added .cs and .config files to script.
Now I am a bit fuzzy on the syntax to actually invoke the service and create a new webservice using c#
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-06-20 : 22:48:46
can you elaborate? whats the issue you're facing in invoking webservice?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -