System.Web.Services.Protocols .... [英] System.Web.Services.Protocols....

查看:138
本文介绍了System.Web.Services.Protocols ....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,



我的要求是我必须从表中创建每行的XML,并将每行的一个XML数据推送到Web服务。这是对Web服务的同步调用,它将发送每行XML的响应。



WSDL文件有一个名为MATCHXML的方法,它有4个参数,即ControlXML, BatchXML,用户名,密码。我通过代码创建了ControlXML和BatchXML,并分别存储到字符串变量中。 WSDL alos包含4个输入,称为RequestUUID,ChannelID,ServiceRequestID和ServiceRequestVersion,必须与方法一起强制发送到Web服务。为了实现这一点,首先我将Web服务URL的Web引用添加到库中,然后调用该方法来访问Web服务。代码如下所示:



//从WSDL文件中启动类的对象



匹配匹配=新匹配



字符串结果= match.MatchXML(controlXML,BatchXML,用户名,密码)



然后,在上面的行显示以下错误:



SSIS包HunterAutomation.dtsx开始。

错误: 0x1 at生成XML文件和更新变量:System.Reflection.TargetInvocationException:调用目标已抛出异常。 ---> System.Web.Services.Protocols.SoapHeaderException:EAI_SOAPINPUT中未设置必填字段;元素 - > Environment.eaiCommon.BTID,Environment.eaiCommon.Header.ChannelID,Environment.eaiCommon.Header.RequestUUID,Environment.eaiCommon.Header.ServiceRequestId,Environment.eaiCommon.Header.ServiceRequestVersion

在System.Web上。 Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message,WebResponse response,Stream responseStream,Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Object [] parameters)

at ST_ae3b1e5eadb64fdba5040f4efa743458.csproj.Hunter.Matching.Match(String controlXml,String batchXml,String username,String password)在C:\ Users \ CPUTRACKINGAPP \ AppData \ Local \Temp \ 3 \SSIS \ 377534961d7f4fdb91565f9366317fdc \网站参考文献\ Hunter \Reference.cs:第93行

at ST_ae3b1e5eadb64fdba5040f4efa743458.csproj.ScriptMain.Main()in C:\ Users\CPUTRACKINGAPP \\ \\AppData\Local\Temp\3\SSIS \ 377534961d7f4fdb91565f9366317fdc \ScriptMain.cs:第1307行

at System.RuntimeMethodHandle._InvokeMethodFast(Object target,Object [] arguments,SignatureStruct&sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner)

at System.RuntimeMethodHandle.InvokeMethodFast(Object target,Object [] arguments,Signature sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner)
$在System.Reflection.RuntimeMethodInfo.Invoke(对象obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化,布尔值skipVisibilityChecks)中的b $ b

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化)

at System.RuntimeType.InvokeMember(String name,BindingFlags bindingFlags,Binder binder,Object target,Object [] providedArgs,ParameterModifier [ ]修饰语,文化eInfo culture,String [] namedParams)

at System.Type.InvokeMember(String name,BindingFlags invokeAttr,Binder binder,Object target,Object [] args,CultureInfo culture)

at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

任务失败:生成XML文件和更新变量

警告:For循环容器中的0x80019002: SSIS警告代码DTS_W_MAXIMUMERRORCOUNTREACHED。执行方法成功,但引发的错误数(1)达到允许的最大值(1);导致失败。当错误数达到MaximumErrorCount中指定的数量时,会发生这种情况。更改MaximumErrorCount或修复错误。

警告:HunterAutomation的0x80019002:SSIS警告代码DTS_W_MAXIMUMERRORCOUNTREACHED。执行方法成功,但引发的错误数(1)达到允许的最大值(1);导致失败。当错误数达到MaximumErrorCount中指定的数量时,会发生这种情况。更改MaximumErrorCount或修复错误。

SSIS包HunterAutomation.dtsx完成:失败。



为了解决问题我有手动创建了soap标题代码。现在我不明白如何发送soap头XML消息和MATCHXML方法。我正在努力解决过去3周的问题,但没有运气。



有谁能帮我解决这个问题,我已经用完了截止日期。



My requirement is I have to create a XML of each row from a table and push one XML data of each row to a web services. This is a syncronous call to web services where it will send the response of each row XML.

The WSDL file is having a method called MATCHXML having 4 parameters namely ControlXML, BatchXML, Username, Password. I have created the ControlXML & BatchXML through code and storing into a string variable seperatly. The WSDL alos contains 4 input called RequestUUID, ChannelID, ServiceRequestID & ServiceRequestVersion which has to be send to web services compulsory along with the method. In order to implement this, first I have added Web reference of the Web service URL into library, then invoked the method to hit the web services. The code looks likes as below:

//Initiated an object of the class from the WSDL file

Matching match = new Matching

string result = match.MatchXML(controlXML,BatchXML,Username,Password)

Then, at the above line it display the below error:

SSIS package "HunterAutomation.dtsx" starting.
Error: 0x1 at Generates XML file & Update variable: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.Services.Protocols.SoapHeaderException: Mandatory field is not set in EAI_SOAPINPUT; Element -> Environment.eaiCommon.BTID, Environment.eaiCommon.Header.ChannelID, Environment.eaiCommon.Header.RequestUUID, Environment.eaiCommon.Header.ServiceRequestId, Environment.eaiCommon.Header.ServiceRequestVersion
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at ST_ae3b1e5eadb64fdba5040f4efa743458.csproj.Hunter.Matching.Match(String controlXml, String batchXml, String username, String password) in C:\Users\CPUTRACKINGAPP\AppData\Local\Temp\3\SSIS\377534961d7f4fdb91565f9366317fdc\Web References\Hunter\Reference.cs:line 93
at ST_ae3b1e5eadb64fdba5040f4efa743458.csproj.ScriptMain.Main() in C:\Users\CPUTRACKINGAPP\AppData\Local\Temp\3\SSIS\377534961d7f4fdb91565f9366317fdc\ScriptMain.cs:line 1307
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
Task failed: Generates XML file & Update variable
Warning: 0x80019002 at For Loop Container: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at HunterAutomation: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "HunterAutomation.dtsx" finished: Failure.

In order to solve the issue i have manual created the soap header code. Now Im not understanding how to send the soap header XML message along with the MATCHXML method. I am trying very hard to solve the issue from last 3 weeks but NO LUCK.

Could anyone please help me out on this and I'm already running out of my deadlines.

推荐答案

这篇关于System.Web.Services.Protocols ....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆