1

Im trying to download some data from web services using Web Service Task component in SSIS. Everything works fine when I insert required Input value manually. The required input value have to be in dateTime type but it only works when I munually write datetime in YYYY-MM-DD or YYYY-MM-DD HH:MM format.

enter image description here

But that of course is not what I wanted to do. So I created a variable with DateTime data type with simple expression:

(DT_DATE) GETDATE()

But that gives me format DD.MM.YYYY HH:MM instead of YYYY-MM-DD or YYYY-MM-DD HH:MM. When I execute the package it goes into error message:

[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.Service.Method' 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()".

I think its only because my variable is in incorrect format. Any suggestions how to change it to desired dateTime format while data type of variable remains with DateTime option ? Thanks !

EDIT : So I managed to solve the problem with the DateTime format, I simply changed the date format on my server to YYYY-MM-DD in the Windows environment (Control Panel - Region - Formats) and it also changed in SSIS.

But the problem still persists, when I check the box in the input section that I use a Variable and select my variable in the correct format as a DateTime with the correct value YYYY-MM-DD, I still get an error message and nothing happens.

Do you have any other solutions to my problem?

Roman Schmidt
  • 55
  • 1
  • 12
  • 1
    have a look at this, should get you moving in the right direction: https://stackoverflow.com/questions/6922517/how-do-i-format-date-value-as-yyyy-mm-dd-using-ssis-expression-builder – Tim Mylott Dec 18 '20 at 20:44
  • @TimMylott thanks Tim, you were right, that article helped me solve the format problem, but the error message problem still persists after I use variable in correct format and value :( – Roman Schmidt Dec 20 '20 at 09:48

0 Answers0