SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Call web method from script task
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Juls
Yak Posting Veteran

USA
51 Posts

Posted - 06/19/2012 :  15:13:39  Show Profile  Reply with Quote
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

India
47040 Posts

Posted - 06/19/2012 :  15:39:17  Show Profile  Reply with Quote
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

USA
51 Posts

Posted - 06/19/2012 :  15:54:12  Show Profile  Reply with Quote
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

India
47040 Posts

Posted - 06/19/2012 :  18:37:38  Show Profile  Reply with Quote
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

USA
51 Posts

Posted - 06/20/2012 :  10:37:20  Show Profile  Reply with Quote
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

India
47040 Posts

Posted - 06/20/2012 :  22:48:46  Show Profile  Reply with Quote
can you elaborate? whats the issue you're facing in invoking webservice?

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

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000