询问者
选择管道不同导致异常?

问题
-
各位好,
我把一个简单的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();
}
}
}
全部回复
-
你的标题不对。
不是选择管道导致的异常,问题不在于管道的选择。
PassThruReceive 和 PassThruTransimit 管道是不做任何处理直接通过的,所以没有发现问题。
你的错误原因是:
Reason: This Assembler cannot retrieve a document specification using this type: "http://CheckGoldCoin.CheckResult#CheckResult".
估计可能:
1、没有正确部署架构,或者存在多个架构
2、命名空间和根节点有误,找不到部署的架构。
相关:
http://www.cnblogs.com/rickie/archive/2007/05/09/739988.aspx
SOLUTION:
Basically, you are trying to send a message using the Xml pipeline on a send port and Biztalk does not know what schema to match it with.
This error occurs when your schema project is not deployed or you have two or more schemas deployed with the same message type (namespace # root node name).
If possible, you can use the passthrough pipeline. That would fix the problem. You could allow unrecognized message on the send port, or remove the same message type.