Web Service Task in SSIS 2012

Hello,
I have a web service task that worked fine prior to upgrading from SQL Server 2005, but in 2012 fails with an error saying the "wsdl file is invalid".  I am using the same wsdl file as I was using in 2005.  Connectivity tests for the
web service connection manager in 2012 worked fine. Any ideas on why I would be getting a failed wsdl file when it worked ok on the 2005 platform?  Below is the specific error:
[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not read the Web Services Description Language (WSDL) file. The input WSDL file is not valid.
The following error occurred while reading the file. There is an error in XML document (3, 2)..
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil..ctor(Object connection, String downloadedWSDL)
   at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
Thanks for any help or suggestions,
Pat   

Need to open the package for editing and resave, perhaps there were changes in how the Web Services task is persisted to package file. (a more typical upgrade path is SSIS 2005 to SSIS 2008, then 2012)
Arthur My Blog

Similar Messages

  • Web service task: Cannot see the expected list of methods

    Problem in using web service task in SSIS
    I added web service in web service task but it wont retrieves me expected method in input. Can anyone please help me ASAP

    see if you've configured it correctly
    http://www.bidn.com/blogs/BillBrannen/bidn-blog/619/ssis-web-service-task-step-by-step
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SSIS Web Service Task Error with WCF Service

    I have read all the other posts on this site and have not been able to resolve my issue.
    For testing purposes i created a very simple WCF service that takes no arguments and returns true.  That is all it does.
    When i create a winform client and instantiate the service i can run my service method and get true back so i know the service works.
    I then create a test SSIS package with 1 task, a web service task. 
    I set the web service tasks properties as follows:
    http connection: http://localhost/WCF_SSIS_Prototype/Service1.svc
    wsdl file: C:\...\SSIS_WCF_Prototype\Service1.wsdl  (I know this is not a valid path, i changed it for posting to forum)
    Service: Service1
    Method: GetData
    Variable: User::BResult
    When i run the package i get the following error:
    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Method 'ProxyNamespace.Service1.GetData' not found..    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection)    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    I'm not sure why it is saying "Method 'ProxyNamespace.Service1.GetData' not found.  It the web service task trying to create a proxy class and naming the proxy class namespace ProxyNamespace? 
    Any help is greatly appreciated.

    Hi,
    How  do you get around the same issue if your string type is based on a client token ?  I downloaded the .wsdl file, was able to see the service name, method and when selecting a method type, I am required to provide a client token which was given
    to me.  (Name column = clienttoken, Type = string, Value = 2227656 - ec8922 (client token numbers goes there)?  I am new to use ssis and need your help please
    error message:  Web Service Task] Error: An error occurred with the following error message:
    "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The web serrvice threw an error during method execution. The error is: An error occurred
    when verifying security fro the message..   
    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)   
    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection) 
     at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()"
    Thank you and regards,
    Bili

  • SSIS Web Service Task Error

    Hi,
    Need your inputs regarding the below error that I am getting when i run the package.
    I have a Web Service Task . On execution of which, I am getting the below error message. Please let me know on the possible resolutions for this error.
    WebHost failed to process a request.
     Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/64935954
     Exception: System.ServiceModel.ServiceActivationException: The service '/mycompanysb_fixedauthrelay_6/RuntimeService.svc' cannot be activated due to an exception during compilation.  The exception message is: Unable to reach mycompanysb.servicebus.windows.net
    via TCP (9351, 9352) or HTTP (80, 443). ---> System.ServiceModel.CommunicationException: Unable to reach mycompanysb.servicebus.windows.net via TCP (9351, 9352) or HTTP (80, 443) ---> System.AggregateException: One or more errors occurred. ---> System.ServiceModel.CommunicationObjectFaultedException:
    The communication object, System.ServiceModel.Channels.ClientFramingDuplexSessionChannel, cannot be used for communication because it is in the Faulted state.
       at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Close()
       at Microsoft.ServiceBus.NetworkDetector.CheckTcpConnectivity(Uri baseAddress, Exception& exception)
       --- End of inner exception stack trace ---
       --- End of inner exception stack trace ---
       at Microsoft.ServiceBus.NetworkDetector.DetectInternalConnectivityModeForAutoDetect(Uri uri)
       at Microsoft.ServiceBus.ConnectivityModeHelper.GetInternalConnectivityMode(ConnectivityMode detectMode, HttpConnectivityMode defaultHttpDetectMode, Uri uri)
       at Microsoft.ServiceBus.ConnectivityModeHelper.GetInternalConnectivityMode(ConnectivitySettings connectivitySettings, HttpConnectivitySettings httpConnectivitySettings, Uri uri)
       at Microsoft.ServiceBus.ConnectivityModeConnectionElement..ctor(ITokenProvider tokenProvider, SocketSecurityRole socketSecurityMode, BindingContext context, NameSettings nameSettings, ConnectivitySettings connectivitySettings, HttpConnectivitySettings
    httpConnectivitySettings)
       at Microsoft.ServiceBus.TcpRelayTransportBindingElement.BuildInnerBindingElement(BindingContext context)
       at Microsoft.ServiceBus.TcpRelayTransportBindingElement.BuildChannelListener[TChannel](BindingContext context)
       at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
       at System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener[TChannel](BindingContext context)
       at System.ServiceModel.Channels.BinaryMessageEncodingBindingElement.BuildChannelListener[TChannel](BindingContext context)
       at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
       at Microsoft.ServiceBus.HttpRelayTransportBindingElement.BuildChannelListener[TChannel](BindingContext context)
       at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
       at System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener[TChannel](BindingContext context)
       at System.ServiceModel.Channels.TextMessageEncodingBindingElement.BuildChannelListener[TChannel](BindingContext context)
       at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
       at System.ServiceModel.Channels.Binding.BuildChannelListener[TChannel](Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters)
       at System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode
    listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession)
       at System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result)
       at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
       at System.ServiceModel.ServiceHostBase.InitializeRuntime()
       at System.ServiceModel.ServiceHostBase.OnBeginOpen()
       at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open()
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity)
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
       --- End of inner exception stack trace ---
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
       at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
     Process Name: w3wp
     Process ID: 12704
    Thanks and Regards,
    Ujjwal
    -Ujjwal

    I am still wandering in a dark forest, how would I repro your issue?
    Please see if you are not overlooking something very obvious:
    http://blogs.msdn.com/b/drnick/archive/2007/03/23/preventing-anonymous-access.aspx
    It seems that there is a difference in how you set it up vs test
    Arthur My Blog

  • Web service task: Error when returning an empty array

    Hi,
    I've encountered an annoying error when using a Web Service Task from an SSIS package in SQL Server Data Tools.
    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Index was outside the bounds of the array..
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    It seems that the Web Service Task generates this error when returning an empty response from the WSDL. I've seen several topics about this here on MSDN but they are all from 2008-2009 and seem to suggest that
    this is a bug.  The workaround suggested is using a script task but I would really love to avoid that since my programming skills are lacking.
    I'm using Visual studio 2010 with SP1.

    Hello,
    From my own experience: in all the cases where I had to use SSIS 2008 to retrieve data or send data to Webservices, I had to revert to using Script Tasks or Script components. Whenever I tried with a Web service task, because the job looked simple, I had
    to abandon it in favour of Scripts. Keep in mind that I try to make use of the SSIS components as often as possible, before reverting to Scripting. But handling web services is the one exception, where I always use scripts. In SSIS 2012 I did not find
    any significant improvement of the Web service task and hence no compelling reason to use it.
    Jan D'Hondt - SQL server BI development

  • WEB Service task excuting error "method not found"

    Hii All,
    I am the beginner of ssis, and on executing the package I am getting error :
    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Method 'ProxyNamespace.BizTalkServiceInstance.Submit'
    not found..
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    Please help me out..

    Hi Mangla,
    Based on my research, the issue always caused by the data type of input variable mismatch for the Web Service. For example, the input type for web service is String. The variable was of type Object but in fact it was a Decimal stored in it. Obviously SSIS
    Web Service Task will not implicitly do a .toString() call on the input variable. So the issue occurs.
    To fix this issue, please change the type of the variable. For more details, please refer to the following similar thread:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1073ad37-ed05-4ab4-85e3-689e1cd17a68/ssis-web-service-task-error-with-wcf-service
    Besides, SSIS cannot invoke services with spaces in the names. And we should configure the HTTP connection manager the following ways:
    Use credentials.
    Use a client certificate.
    Provide a time-out for connecting to the server and a chunk size for writing data.
    Use a proxy server.
    Reference:
    HTTP Connection Manager
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Rerun Web Service Task whenever it fails

    Hi All,
    In one of my package i m using web service task and it is failing everytime. Below is the error:
    An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: The operation has timed out.
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    I referred the below blog and tried to implement it in my project.
    http://microsoft-ssis.blogspot.com/2014/06/retry-task-on-failure.html
    In For Loop Container, when i am using the below expression , the container is running but web service task is not running.
    EvalExpression - @RetryCounter<=@RetryMax && @QuitForLoop==false
    but when i change the expression to
    @RetryCounter<5, the web service task is also running.
    where i am going wrong. are we not supposed to use expression like @RetryCounter<=@RetryMax && @QuitForLoop==false in For Loop Container.

    Read the comments below, you need to reset the QuitForLoop, perhaps this is the issue.
    I would approach the issue with Checkpoints, and restart on failure as in
    https://www.simple-talk.com/sql/sql-tools/implementing-checkpoints-in-an-ssis-package/ or
    https://sqlserverrider.wordpress.com/2011/09/24/rerun-ssis-package-with-checkpoints/
    Arthur
    MyBlog
    Twitter

  • SSL web service task SOAP header Action was not understood..

    Hi all,
    While I create  web service task to consum a wcf service using SSL and execute the task it give the following error: But the same WCF service is deployed in nonSSL (basicHTTPBinding) , it works well and the results are received. Could any one suggest
    what is missing?
    Error: 0xC002F304 at Web Service Task, Web Service Task: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: SOAP
    header Action was not understood..
     at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    Task failed: Web Service Task
    SSIS package "Package.dtsx" finished: Success.
    Regards
    Venkatesh G

    Can you provide more information? Are you using BasicHttpBinding with transport security? If you access the service from a console client instead of SQL Server Web Service Task, does it work?
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    If you have feedback about forum business, please contact
    [email protected] But please do not ask technical questions in the email.

  • Web service Task - Value pair as variable issue

    firstly .. I  not an .net Developer. 
    We have scenario in which I have a execute SQL task which sends a set of rows with two columns as an variable (object) to a for each loop container.The for each loop container has the web service task and each time it runs.
    The web service task accepts allows/accepts a single variable but I need to provide the above two columns as pair to this complex type.....any help is appriciated....

    3rd ssis variable should be string. 
    The input variables have to be specified in the ReadOnlyVariables property. The output result variable has to be specified in the ReadWriteVariables property. 
    inside the script task
    Dts.Variables("variable3").Value = Dts.Variables("variable1").Value.ostring() +Dts.Variables("variable2").Value.tostring();
    Make sure before you are concatenating, both the values in the variable1 and variable2 should be string.
    Thanks,
    Anilkumar

  • Web Service Error in SSIS

    Dear All,
         I have a web service, which is used to convert one currency type to another currency. With help of web service task calling that web service in SSIS package. 
    After configuration I tested connection and downloaded WSDL file
    General Tab. Configured Input and Output Tab in Web Service Task.
          When we execute SSIS package it is throwing an error like below. I try to configure with Proxy and with out proxy in both the cases it is throwing same error.
    Error Description :
    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Object reference not set to an instance of an
    object..
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    Can Some one help on this issue.
    Regards,
    Praveen C
    Regards, Praveen

    Hello,
    When you say you have configured the proxy, are you talking about the proxy tab on the HTTP Connection Manager? Please
    confirm you have configured it properly.
    http://msdn.microsoft.com/en-us/library/ms189707.aspx
    What is the name of the web service?
    Can you try to do the same on a script task as mentioned in the following post?
    http://blogs.msdn.com/b/farukcelik/archive/2009/07/17/ssis-consuming-a-web-service-without-using-web-service-task-and-http-connection-manager-within-script-task.aspx?Redirected=true
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Web Service Task - XML Task - values are empty while trying to read from XPATH. Can someone help me on this ?

    Hi,
    I have to fetch Emp details (emp code, last name, first name ...etc) from a WSDL.
    for this i have created HTTP connection -> created Web Service Task -> created XML Tasks for those emp code, last name, first name ... etc for each -> set a
    breakpoint over post execution -> verified & found that the variables are blank though my
    results variable has some XML data generated.
    please see some screenshots as below & suggest me how to get is succeed & put the values in database table:

    Thanks a lot in advance !!! :) 
    best regards,
    Venkat

  • Web Service Task Error

    Hi, After successfully testing connection to my source web service, while executing my web service task, I face the following error. Can anyone help me????
    [Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not load the proxy for the specified Web service. The error is: Could not load file or assembly
    'iiglotg3.dll' or one of its dependencies. Access is denied..
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.loadProxyInAppDomain()
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    Regards,
    Njdeh Tahmasian

    Could not load file or assembly 'iiglotg3.dll' or one of its dependencies.
    Access is denied..
    Looks like a permission issue or maybe the assembly don't exists on the server where the package is running; you should check that first.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Web Service Task - that accepts XmlNode Input

    I'm creating an SSIS package that uses a web service method called "GetReportResults" ). The input parameters are:
    username (string)
    password (string)
    reportid (int)
    templateValues (xmlnode)
    When I run the package, how do I input the values for the xmlnode? The web service documentation shows an example that says I need to pass in the templateValues (filters) like this for the xmlnode:
    <FilterItems>
    <FilterItem FilterItemId="62898" FieldTitle="Date Modified" Operator="GreaterThan" Value="" IsTemplate="true" />
    <FilterItem FilterItemId="62899" FieldTitle="Date Modified" Operator="LessThan" Value="" IsTemplate="true" />
    <FilterItem FilterItemId="62900" FieldTitle="Date Modified" Operator="GreaterThanOrEqualTo" Value="8/13/2013 12:00 AM" IsTemplate="false" />
    <FilterItem FilterItemId="62901" FieldTitle="Status" Operator="DoesNotContain" Value="" IsTemplate="true" />
    </FilterItems>
    How do I go about setting this up so that when the package runs the templateValues are automatically input? Is there some sort of XML task that will accomplish this? If so, how would I implement this.

    I did find find this in the web service documentation: 
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0.0">
    <xs:element name="FilterItems">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="FilterItem" minOccurs="1" maxOccurs="unbounded">
    <xs:complexType>
    <!-- Set the inner text to the appropriate value -->
    <xs:simpleContent id="Value">
    <xs:extension base="xs:string">
    <!--
    You must use either the FilterItemId or the FieldTitle
    -->
    <xs:attribute name="FilterItemId" type="xs:integer" use="optional"/>
    <xs:attribute name="FieldTitle" type="xs:string" use="optional"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>

  • Byte input to Webservice Task in SSIS 2012

    Hi,
    I have just created a new project in SSIS 2012 and I am using a webservice task in a package.
    I imported the WSDL file and I have several inputs to set to use it properly.
    I put variables on the 4 first inputs that are strings with success but I have a problem with the last one.
    The last one is called xmlData and is in "byte" type and I can not set it correctly.
    In the XSD file I have this definition: <xsd:element
    minOccurs="0" name="xmlData" nillable="true" type="xsd:base64Binary"
    />
    It is supposed to contain a XML file that I have to encode in base64 and then fill the xmlData with the binary value.
    To encode my XML file to base64 I use a C# task but I do not know how to declare the value and how to set it.
    I do it this way:
                FileStream myStream = new FileStream(@"H:\myXML.XML", FileMode.Open, FileAccess.Read); 
                BinaryReader reader = new BinaryReader(myStream); 
                byte[] fichierXML = new byte[reader.BaseStream.Length]; 
                for (int i = 0; i < reader.BaseStream.Length; i++) 
                    fichierXML[i] = reader.ReadByte();
                reader.Close(); 
                myStream.Close(); 
                string xmlAsString = EncodeBytesAsBase64(fichierXML);
                MessageBox.Show(xmlAsString);
                // Conversion de la String en byte[]
                byte[] xmlData = System.Text.Encoding.UTF8.GetBytes(xmlAsString);            
                Dts.Variables["User::monXmlData"].Value = xmlData;
    My variable User::monXmlData is an Object and there is no problem in execution.
    The C# script runs well and the webservice task too but I always get an error response for the webservice saying that my xmlData field is not correct.
    I think that my base64 encoding is correct because when I copy the result in my messagebox and paste in base64 decode on a free web decoder I get my original XML text.
    Is there someone who can help me please?

    Thanks to all that took some time to read me.
    I have finally found the solution.
    The Base64 encoding is not necessary. It is automatically done by the webservice when the request is sent.
    The important thing to remember is that when you have to send a "byte[]" variable, you have to use a "Object" variable as an imput for the webservice.

  • XML Task in SSIS 2012

    Hi All,
    I need help on one requirement in SSIS 2012, Please let me know for any suggestions or solution.
    I have two XML files having different structure, I have to manipulate data by applying XSLT and creating single output xml. (Which needs to pass these 2 Xml files and 1 xslt to SSIS task)
    In SSIS we have in-built XMLTask which will take XSLT operation of 1 xml and 1 xslt to deliver new output xml, Is there any way to pass 2 xml files and 1 xslt to get new output xml?
    Thanks for any help

    Hi visakh,
    i have tried  as you said.but still i am not able to load multiple Xml files.
    I'm having a problem using the Foreach Loop container that contains an XML Task followed by a data flow task. When I run my package in the debugger,
    the XML Task fails with the following errors: [XML Task] Error: An error occurred with the following error message: "Data at the root level is invalid. Line 1, position 1.". [XML Task] Error: Property "New Source" has no source Xml Text; Xml Text is either
    invalid, null or empty string.
    The Foreach Loop container is a file enumerator. The XML Task validates XML files using an XSD file. The XML Task SourceType is a XSLTand the Source has the variable set by the Foreach Loop (index 0). I have an XML file which I know is valid. For some reason,
    the XML Task Source is not referencing the variable, set by the Foreach loop.
    If I use a file connection to the existing XML file, instead of using the variable, the XML Task validates the file successfully. I believe there might be a bug in the XML Task when a variable is specified. If I disable the task and let my data flow task run,
    it has no problem importing each XML file, in the directory, using an XML Source that uses the Foreach loop variable for the Source. My data flow completes correctly.
    Thanks

Maybe you are looking for