询问者
选择管道不一样导致调用Webservices异常?

问题
-
各位好,
我把一个简单的Biztalk流程(根据输入的一个字段串判断是否指定字符串,若是返回同样字段串,否则返回字符串“-1”)发布为Webservices,然后在管理控制台中新建了一个 Receive Port ,采用“SOAP”,但选择不同的Receive pipeline、Send pipeline,则其中一个正常,另一个导致异常,请问两种管道有什么根本区别,为什么会导致异常?
(1) Receive pipeline: PassThruReceive
Send pipeline: PassThruTransimit 程序可以正常调用Webservices(2)Receive pipeline: XMLReceive
Send pipeline: XMLTransmit 程序抛异常1.程序客户端异常信息:
System.Web.Services.Protocols.SoapException was unhandled
Message="Internal SOAP Processing Failure"
Source="System.Web.Services"
Actor=""
Lang=""
Node=""
Role=""
StackTrace:
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 TestCheckGoldCoin.localhost.CheckGoldCoin_CheckGoldCoinProcess_CheckGoldCoinPort.Operation_1(CheckReqInfo CheckReqInfo) in C:\tutorial\Lessons\TestAsmx\TestCheckGoldCoin\Web References\localhost\Reference.cs:line 80
at TestCheckGoldCoin.Program.Main(String[] args) in C:\tutorial\Lessons\TestAsmx\TestCheckGoldCoin\Program.cs:line 16
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()2.管理控制台EventViewer中信息
A response message sent to adapter "SOAP" on receive port "WebPort_CheckGoldCoin_Proxy/CheckGoldCoin_CheckGoldCoinProcess_CheckGoldCoinPort" with URI "/CheckGoldCoin_Proxy/CheckGoldCoin_CheckGoldCoinProcess_CheckGoldCoinPort.asmx" is suspended.
Error details: There was a failure executing the response(send) pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Receive Port: "WebPort_CheckGoldCoin_Proxy/CheckGoldCoin_CheckGoldCoinProcess_CheckGoldCoinPort" URI: "/CheckGoldCoin_Proxy/CheckGoldCoin_CheckGoldCoinProcess_CheckGoldCoinPort.asmx" Reason: This Assembler cannot retrieve a document specification using this type: "http://CheckGoldCoin.CheckResult#CheckResult".
MessageId: {C4550732-AEB1-4701-B84C-6106E8905D28}
InstanceID: {151800B2-694E-411B-972C-CBA90C817F90}调用程序客户端是:
using System;
using System.Collections.Generic;
using System.Text;
using TestCheckGoldCoin.localhost;namespace TestCheckGoldCoin
{
class Program
{
static void Main(string[] args)
{
CheckReqInfo ri = new CheckReqInfo();
ri.DepartmentNo = "EM10000";
//ri.DepartmentNo = "EM20000";
CheckGoldCoin_CheckGoldCoinProcess_CheckGoldCoinPort pt = new CheckGoldCoin_CheckGoldCoinProcess_CheckGoldCoinPort();
CheckResult cr = pt.Operation_1(ri);
Console.WriteLine("Return info is: " + cr.ResultCode);
Console.WriteLine("Press any enter to continue..");
Console.ReadLine();
}
}
}
全部回复
-
XMLTransmit 发送管道在发送消息时,会检查所要发送的消息类型是否在已经部署的消息schema中存在,如果不存在就会抛出没有匹配到消息的错误,你碰到的错误是:表示说,XMLTransmit 发送管道在发送一个类型为"http://CheckGoldCoin.CheckResult#CheckResult"的消息时,没有在biztalk应用已经不属的消息架构中匹配到这个消息类型,就是说在已部署的消息中没有"http://CheckGoldCoin.CheckResult#CheckResult"这样的消息类型。PassThruTransimit 发送管道是直通发送管道,对发送的消息不做任何检查和处理,直接原样的发送出去。