I am trying to call a java base web service method writing following code in script task's entry point method. Following code get executing properly if i call from console application but while calling from SSIS control flow, upto message box 1 it get executed properly but on executing webRequest.GetResponse() what happen dont know neither it gives error nor it execute next line of code.
public void Main()
{
string envelopeContent = GetSoapEvvelope();
XmlDocument soapEnvelopeXml = new XmlDocument();
soapEnvelopeXml.LoadXml(envelopeContent);
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(_url);
webRequest.Method = "POST"; // get executed
soapEnvelopeXml.Save(webRequest.GetRequestStream());
MessageBox.Show("1");
WebResponse response = webRequest.GetResponse();
MessageBox.Show("2"); // does not get executed
string responseString = string.Empty;
using (var reader = new StreamReader(response.GetResponseStream()))
{
responseString = reader.ReadToEnd();
}
XmlDocument doc = new XmlDocument();
doc.LoadXml(responseString);
XmlNode node = doc.SelectSingleNode("//*[local-name()='result']");
}
Please guide me what to do? As per my understanding web service task require WSDL/proxy. Is there any other way to call java base web service passing soap envelope in request?
Thanks
@paul
I experienced this while using sql server 2008 R2. Now i have tried same solution in sql server 2012 and it is working fine with out any changes.