首页 \ 问答 \ SSIS Web服务任务XmlNode输入可能吗?(SSIS Web Service Task XmlNode Input POSSIBLE?)

SSIS Web服务任务XmlNode输入可能吗?(SSIS Web Service Task XmlNode Input POSSIBLE?)

我在过去的两周里搜索了互联网,尝试了很多不同的方式,我开始认为这可能不是通过SSIS中的Web服务任务实现的。 我使用提供的WSDL在SSIS中创建了一个Web服务任务 - 请参见下面的截图。

在此处输入图像描述

正如您所看到的,对此Web服务方法的要求是传入包含过滤器项的XML节点,如下所示:

<FilterItems><FilterItem FilterItemId="12345">4/20/2015 12:00:00 AM</FilterItem></FilterItems>

这个“FilterItems”节点将嵌套在另一个名为“TemplateValues”的XML元素之间 - 请参阅soap body:

<soap:Body>
<GetReportResults xmlns="https://service.service.com">
  <username>string</username>
  <password>string</password>
  <reportId>int</reportId>
  <templateValues>xml</templateValues>
</GetReportResults>

我面临的问题是,当我在SSIS中的变量列表中选择数据类型时,没有XML数据类型,所以我必须使用字符串。 有趣的是,我可以使用SOAPUI并通过传入调用相同的方法没有问题:

<FilterItems><FilterItem FilterItemId="12345">4/20/2015 12:00:00 AM</FilterItem></FilterItems>

这是我能够使用的SOAPUI调用:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"      xmlns:ser="https://service.servicename.com">
   <soapenv:Header/>
   <soapenv:Body>
       <ser:GetReportResults>
         <!--Optional:-->
         <ser:username>username</ser:username>
         <!--Optional:-->
         <ser:password>12343</ser:password>
         <ser:reportId>000</ser:reportId>
         <!--Optional:-->
         <ser:templateValues>
            <FilterItems><FilterItem FilterItemId="12345">4/20/2015 12:00:00      AM</FilterItem></FilterItems>
         </ser:templateValues>
      </ser:GetReportResults>
    </soapenv:Body>
    </soapenv:Envelope>

正如您所看到的,我只是在元素和SOAPUI之间粘贴了xml处理请求而没有任何问题 - 那么为什么SSIS Web服务任务不能处理同样的请求呢?

我的想法是,因为SSIS强迫我使用字符串变量来存储xnlNode,正在解析某些字符。 以下是调试和运行Web服务任务时变量的结果:

        Value   <FilterItems><FilterItem FilterItemId=\"12345\">4/20/2015 12:00:00 AM</FilterItem></FilterItems>    

调试结果显示引号已被转义,我相信这是问题的一部分。 以下是我尝试过的其他一些事情:

传入完全编码的XML(也尝试使用CDATA):

&lt;FilterItems&gt;&lt;FilterItem FilterItemId=&quot;12345&quot;&gt;4/20/2015 12:00:00 AM&lt;/FilterItem&gt;&lt;/FilterItems&gt;

我还尝试创建一个SQL任务,并在执行时抓住xml并将其添加到变量中。 再一次在运行时,为引号添加转义字符,导致方法不执行。 我发现很难相信这不是一个常见的问题,并且没有一个简单的解决方法将XML传递到Web服务任务。 这是SSIS中的错误还是仅仅是未实现的错误? 非常感谢帮助!


I've scoured the internet for the past two weeks and tried so many different ways that I'm beginning to think this might not be possible via a web service task in SSIS. I've created a web service task in SSIS by using a provided WSDL - see screenshot below.

enter image description here

As you can see the requirement for this web service method is to pass in an XML node which contains filter items like so:

<FilterItems><FilterItem FilterItemId="12345">4/20/2015 12:00:00 AM</FilterItem></FilterItems>

This "FilterItems" node is to be nested in between another XML element named "TemplateValues" - see soap body:

<soap:Body>
<GetReportResults xmlns="https://service.service.com">
  <username>string</username>
  <password>string</password>
  <reportId>int</reportId>
  <templateValues>xml</templateValues>
</GetReportResults>

The problem I'm facing is that when I go to chose a data type in the variable list in SSIS, there is no XML data type so I have to use a string. The funny part is that I can use SOAPUI and call the same method with no issues just by passing in:

<FilterItems><FilterItem FilterItemId="12345">4/20/2015 12:00:00 AM</FilterItem></FilterItems>

Here is the SOAPUI call that I am able to use:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"      xmlns:ser="https://service.servicename.com">
   <soapenv:Header/>
   <soapenv:Body>
       <ser:GetReportResults>
         <!--Optional:-->
         <ser:username>username</ser:username>
         <!--Optional:-->
         <ser:password>12343</ser:password>
         <ser:reportId>000</ser:reportId>
         <!--Optional:-->
         <ser:templateValues>
            <FilterItems><FilterItem FilterItemId="12345">4/20/2015 12:00:00      AM</FilterItem></FilterItems>
         </ser:templateValues>
      </ser:GetReportResults>
    </soapenv:Body>
    </soapenv:Envelope>

As you can see, I've just pasted the xml in between the element and SOAPUI processes the request with no problem - so why can't SSIS web service task process this same request?

My thoughts are that since SSIS is forcing me to use a string variable to store the xnlNode that certain characters are being parsed. Here are the results of the variable when I debug and run the web service task:

        Value   <FilterItems><FilterItem FilterItemId=\"12345\">4/20/2015 12:00:00 AM</FilterItem></FilterItems>    

The debugging results show that the quotes have been escaped and I believe this is part of the problem. Here are some other things I've tried:

Passing in entirely encoded XML(also tried using CDATA):

&lt;FilterItems&gt;&lt;FilterItem FilterItemId=&quot;12345&quot;&gt;4/20/2015 12:00:00 AM&lt;/FilterItem&gt;&lt;/FilterItems&gt;

I also tried creating a SQL task and when executed would grab the xml and add it to a variable. Once again at runtime, escape characters were added in for the quotes causing the method not to execute. I'm finding it hard to believe that this is not a common issue and there isn't an easy workaround to passing in XML into a web service task. Is this a fault in SSIS or just something that hasn't been implemented? Help would be much appreciated!


原文:https://stackoverflow.com/questions/29803088
更新时间:2024-02-22 21:02

最满意答案

您必须在application.cssapplication.js提及添加的文件。 添加的任何新文件都必须在应用程序文件中提及,如果您使用资产,还必须使用rake:assets precompile资产。


You will have to mention the added files into application.css and application.js . Any new files added will have to mentioned in the application file , and also you will have to precompile the assets using rake:assets precompile if you are using assets .

相关问答

更多

相关文章

更多

最新问答

更多
  • python的访问器方法有哪些
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。
  • 响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)
  • 在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)
  • NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)
  • 元素上的盒子阴影行为(box-shadow behaviour on elements)
  • Laravel检查是否存在记录(Laravel Checking If a Record Exists)
  • 设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
  • 想学Linux 运维 深圳有哪个培训机构好一点
  • 为什么有时不需要在lambda中捕获一个常量变量?(Why is a const variable sometimes not required to be captured in a lambda?)
  • 在Framework 3.5中使用服务器标签<%=%>设置Visible属性(Set Visible property with server tag <%= %> in Framework 3.5)
  • AdoNetAppender中的log4net连接类型无效(log4net connection type invalid in AdoNetAppender)
  • 错误:发送后无法设置标题。(Error: Can't set headers after they are sent. authentication system)
  • 等待EC2实例重启(Wait for an EC2 instance to reboot)
  • 如何在红宝石中使用正则表达式?(How to do this in regex in ruby?)
  • 使用鼠标在OpenGL GLUT中绘制多边形(Draw a polygon in OpenGL GLUT with mouse)
  • 江民杀毒软件的KSysnon.sys模块是什么东西?
  • 处理器在传递到add_xpath()或add_value()时调用了什么顺序?(What order are processors called when passed into add_xpath() or add_value()?)
  • sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
  • 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
  • AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
  • SQL查询,其中字段不包含$ x(SQL Query Where Field DOES NOT Contain $x)
  • PerSession与PerCall(PerSession vs. PerCall)
  • C#:有两个构造函数的对象:如何限制哪些属性设置在一起?(C#: Object having two constructors: how to limit which properties are set together?)
  • 平衡一个精灵(Balancing a sprite)
  • n2cms Asp.net在“文件”菜单上给出错误(文件管理器)(n2cms Asp.net give error on Files menu (File Manager))
  • Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
  • 湖北京山哪里有修平板计算机的